You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/04/29 01:04:16 UTC

[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #628: refactor(c/driver/postgresql): Remove utils duplication

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


##########
c/driver/postgresql/database.cc:
##########
@@ -42,7 +42,8 @@ AdbcStatusCode PostgresDatabase::Init(struct AdbcError* error) {
 
 AdbcStatusCode PostgresDatabase::Release(struct AdbcError* error) {
   if (open_connections_ != 0) {
-    SetError(error, "Database released with ", open_connections_, " open connections");
+    SetError(error, "%s%d%s", "[libpq] Database released with ", open_connections_,

Review Comment:
   Is `open_connections_` an `int`? I forget the details, but I think `-Wpedantic` on gcc will fire if it is not and 32-bit windows may segfault. I usually do `static_cast<int>()` for `%d` or `static_cast<long>()` for `%ld` to make sure since most of our C++ uses `int32_t` and `int64_t`.



-- 
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