I'm running psycopg2 on Python 3.9, querying a Redshift table.
I'm querying a table with a SELECT *
passed to the cursor.execute()
method:
query = 'select * from my_schema.my_table;'
cursor = connection.cursor(cursor_factory=RealDictCursor) # psycopg2 connection
cursor.execute(query)
data = cursor.fetchall()
And, I'm getting back the following:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mypython.py", <lines>
File "/usr/local/lib/python3.9/site-packages/psycopg2/extras.py", line 236, in execute
return super().execute(query, vars)
psycopg2.errors.InternalError_: Assert
DETAIL:
-----------------------------------------------
error: Assert
code: 1000
context: status == 0 - timestamp: '-9223372036854775808'
query: <query #>
location: cg_util.cpp:705
process: <process>
-----------------------------------------------
I can query other tables in different schema and the same schema, but not this table.
The table has varchar
and timestamp
column types. I'm using the -infinity
Special Date/Time Input in one of the columns.