paleolimbot commented on code in PR #2219:
URL: https://github.com/apache/arrow-adbc/pull/2219#discussion_r1829766287


##########
c/driver/postgresql/database.h:
##########
@@ -58,12 +62,29 @@ class PostgresDatabase {
     return type_resolver_;
   }
 
-  AdbcStatusCode RebuildTypeResolver(struct AdbcError* error);
+  Status InitVersions(PGconn* conn);
+  Status RebuildTypeResolver(PGconn* conn);
+  std::string_view VendorName() {
+    if (redshift_server_version_[0] != 0) {
+      return "Redshift";
+    } else {
+      return "PostgreSQL";
+    }
+  }
+  const std::array<int, 3>& VendorVersion() {
+    if (redshift_server_version_[0] != 0) {
+      return redshift_server_version_;
+    } else {
+      return postgres_server_version_;
+    }
+  }
 
  private:
   int32_t open_connections_;
   std::string uri_;
   std::shared_ptr<PostgresTypeResolver> type_resolver_;
+  std::array<int, 3> postgres_server_version_{};
+  std::array<int, 3> redshift_server_version_{};

Review Comment:
   I'm not sure I have a clear vision about how that would look but if we need 
to update the internals to be cleaner later on we can!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to