Fix generate_series argument types in the history explain script.

PostgreSQL treated the bounds as smallint and could not choose an overload.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
samsik
2026-10-10 10:13:24 +03:00
co-authored by Cursor
parent ae4d626ce6
commit bf0c2905ef
+1 -1
View File
@@ -55,7 +55,7 @@ def main() -> None:
""" """
INSERT INTO messages (id, chat_id, sender_id, text, created_at) INSERT INTO messages (id, chat_id, sender_id, text, created_at)
SELECT gen_random_uuid(), %s, %s, 'm', %s + (g || ' seconds')::interval SELECT gen_random_uuid(), %s, %s, 'm', %s + (g || ' seconds')::interval
FROM generate_series(%s, %s) AS g FROM generate_series(%s::bigint, %s::bigint) AS g
""", """,
(chat_id, user_id, START, count + 1, 10000), (chat_id, user_id, START, count + 1, 10000),
) )