We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When calling GetTableSchema on the postgresql driver, the following behavior is observed:
GetTableSchema
catalog
db_schema
I have been able to reproduce the issues with Go and Python bindings. Below are the steps for reproducing in Python:
from adbc_driver_postgresql import dbapi uri = "postgresql://postgres@localhost:5432/postgres" # Setup example with dbapi.connect(uri) as conn: with conn.cursor() as cur: cur.execute("CREATE TABLE foo (bar int)") conn.commit() # Correct, inferring catalog: postgres, db_schema: public with dbapi.connect(uri) as conn: schema = conn.adbc_get_table_schema("foo") print(schema) # bar: int32 # Incorrect, catalog_filter is ignored with dbapi.connect(uri) as conn: schema = conn.adbc_get_table_schema("foo", catalog_filter="doesnt_exist") print(schema) # bar: int32 # Incorrect, raises exception when foo should be found in public schema with dbapi.connect(uri) as conn: schema = conn.adbc_get_table_schema("foo", db_schema_filter="public") # Exception raised OperationalError: ADBC_STATUS_IO (10): [libpq] Failed to prepare query: ERROR: syntax error at or near "$2" LINE 1: ...= typ.oid WHERE attr.attnum >= 0 AND cls.oid = $1.$2::regcla... ^ Query was:SELECT attname, atttypid FROM pg_cat
Version Info Python: 3.11.4 adbc_driver_postgresql: 0.8.0
The text was updated successfully, but these errors were encountered:
Relevant part of the C++ code for reference: https://github.com/apache/arrow-adbc/blob/main/c/driver/postgresql/connection.cc#L1144
Sorry, something went wrong.
In Postgres, you can only access the database (catalog) you're connected to.
A client connection to the server can only access data in a single database, the one specified in the connection request.
(https://www.postgresql.org/docs/current/ddl-schemas.html)
However we should support schemas properly.
fix(c/driver/postgresql): support catalog arg of GetTableSchema
8fd34cd
Fixes apache#1339.
fix(c/driver/postgresql): support catalog arg of GetTableSchema (#1387)
5ca9c29
Fixes #1339.
lidavidm
Successfully merging a pull request may close this issue.
When calling
GetTableSchema
on the postgresql driver, the following behavior is observed:catalog
is ignoreddb_schema
is set causes a postgres syntax errorI have been able to reproduce the issues with Go and Python bindings. Below are the steps for reproducing in Python:
Version Info
Python: 3.11.4
adbc_driver_postgresql: 0.8.0
The text was updated successfully, but these errors were encountered: