WillAyd commented on code in PR #658:
URL: https://github.com/apache/arrow-adbc/pull/658#discussion_r1187674706
##########
c/driver/postgresql/connection.cc:
##########
@@ -68,6 +75,76 @@ AdbcStatusCode PostgresConnection::Commit(struct AdbcError*
error) {
return ADBC_STATUS_OK;
}
+AdbcStatusCode PostgresConnectionGetInfoImpl(const uint32_t* info_codes,
+ size_t info_codes_length,
+ struct ArrowSchema* schema,
+ struct ArrowArray* array,
+ struct AdbcError* error) {
+ RAISE_ADBC(AdbcInitConnectionGetInfoSchema(info_codes, info_codes_length,
schema, array,
+ error));
+
+ for (size_t i = 0; i < info_codes_length; i++) {
+ switch (info_codes[i]) {
+ case ADBC_INFO_VENDOR_NAME:
+ RAISE_ADBC(
+ AdbcConnectionGetInfoAppendString(array, info_codes[i],
"PostgreSQL", error));
+ break;
+ case ADBC_INFO_VENDOR_VERSION:
+ RAISE_ADBC(AdbcConnectionGetInfoAppendString(
+ array, info_codes[i], std::to_string(PQlibVersion()).c_str(),
error));
+ break;
+ case ADBC_INFO_DRIVER_NAME:
+ RAISE_ADBC(AdbcConnectionGetInfoAppendString(array, info_codes[i],
+ "ADBC PostgreSQL Driver",
error));
+ break;
+ case ADBC_INFO_DRIVER_VERSION:
+ // TODO(lidavidm): fill in driver version
Review Comment:
OK cool. Gave this a look but keeping for a follow up - I think will require
updating the CMake targets for the driver libraries and test libraries.
Probably not too difficult just didn't want to cram to much into this PR
--
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]