You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/05/12 14:53:21 UTC

[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #679: feat(c/driver/postgres): Implement GetObjectsDbSchemas for Postgres

lidavidm commented on code in PR #679:
URL: https://github.com/apache/arrow-adbc/pull/679#discussion_r1192479423


##########
c/driver/postgresql/connection.cc:
##########
@@ -182,7 +216,12 @@ AdbcStatusCode PostgresConnectionGetObjectsImpl(
         if (depth == ADBC_OBJECT_DEPTH_CATALOGS) {
           CHECK_NA(INTERNAL, ArrowArrayAppendNull(catalog_db_schemas_col, 1), error);
         } else {
-          return ADBC_STATUS_NOT_IMPLEMENTED;
+          if (depth >= ADBC_OBJECT_DEPTH_DB_SCHEMAS) {
+            RAISE_ADBC(PostgresConnectionGetSchemasImpl(conn, depth,

Review Comment:
   Yeah, it's supposed to be a nested data structure, so the catalog name appears once, with the schemas nested inside that row, and ditto for tables being nested into catalogs. The Flight SQL driver has code along those lines, if you want to reference it (in Go/Java).
   
   It is a bit annoying and if I could do it again I would probably stick with the Flight SQL design (GetTables/GetCatalogs/GetSchemas). (Or possibly Calcite's design, which is more flexible; that has come up before too.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org