forked from mtusi2026/mtusi2026lab2
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:
@@ -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),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user