Closed nrainer-materialize closed 1 month ago
This actually only happens against Materialize: https://github.com/MaterializeInc/database-issues/issues/8214 Works against Postgres:
>>> c = pg8000.connect(...)
>>> cur = c.cursor()
>>> cur.execute("SELECT array_agg(x) FROM t")
<pg8000.legacy.Cursor object at 0x744c5d69c490>
>>> cur.fetchall()
([[<Range [3,9)>, <Range (,9)>, <Range (,)>]],)
Yes, I found it worked on PostgreSQL too, here's the code:
import pg8000.native
con = pg8000.native.Connection("postgres", password="cpsnow")
con.run("CREATE TEMPORARY TABLE t (x INT4RANGE);")
con.run(
"INSERT INTO t VALUES ('[3,9)'::INT4RANGE), ('(,9)'::INT4RANGE), "
"('(,)'::INT4RANGE);"
)
con.run("SELECT array_agg(x) FROM t;")
Given the setup
the following query causes a
ValueError
: