-
Notifications
You must be signed in to change notification settings - Fork 144
Description
We need to implement this. This should be possible via PQdescribePrepared
: https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-PQDESCRIBEPREPARED
The context is that I'm making a SQLAlchemy Dialect for PostgreSQL/ADBC
Awesome!
How can I get ADBC to assume that it's just an INT?
I think in this case it's coming from pyarrow, which picks int64 as its default inference of an arbitrary Python integer:
rb = pyarrow.record_batch( It's a great point that the default conversion to BIGINT is likely to cause some problems. I forget from when I was working on this whether libpq gives us the opportunity to query the parameter types that it thinks we should be using from an arbitrary query (it looks like it isn't implemented from our side, anyway):
arrow-adbc/c/driver/postgresql/statement.cc
Lines 763 to 766 in 5721207
AdbcStatusCode PostgresStatement::GetParameterSchema(struct ArrowSchema* schema, struct AdbcError* error) { return ADBC_STATUS_NOT_IMPLEMENTED; }
Originally posted by @paleolimbot in #2865 (comment)