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


##########
c/driver/postgresql/error.cc:
##########
@@ -29,72 +29,27 @@
 
 namespace adbcpq {
 
-namespace {
-struct DetailField {
-  int code;
-  std::string key;
-};
-
-static const std::vector<DetailField> kDetailFields = {
-    {PG_DIAG_COLUMN_NAME, "PG_DIAG_COLUMN_NAME"},
-    {PG_DIAG_CONTEXT, "PG_DIAG_CONTEXT"},
-    {PG_DIAG_CONSTRAINT_NAME, "PG_DIAG_CONSTRAINT_NAME"},
-    {PG_DIAG_DATATYPE_NAME, "PG_DIAG_DATATYPE_NAME"},
-    {PG_DIAG_INTERNAL_POSITION, "PG_DIAG_INTERNAL_POSITION"},
-    {PG_DIAG_INTERNAL_QUERY, "PG_DIAG_INTERNAL_QUERY"},
-    {PG_DIAG_MESSAGE_PRIMARY, "PG_DIAG_MESSAGE_PRIMARY"},
-    {PG_DIAG_MESSAGE_DETAIL, "PG_DIAG_MESSAGE_DETAIL"},
-    {PG_DIAG_MESSAGE_HINT, "PG_DIAG_MESSAGE_HINT"},
-    {PG_DIAG_SEVERITY_NONLOCALIZED, "PG_DIAG_SEVERITY_NONLOCALIZED"},
-    {PG_DIAG_SQLSTATE, "PG_DIAG_SQLSTATE"},
-    {PG_DIAG_STATEMENT_POSITION, "PG_DIAG_STATEMENT_POSITION"},
-    {PG_DIAG_SCHEMA_NAME, "PG_DIAG_SCHEMA_NAME"},
-    {PG_DIAG_TABLE_NAME, "PG_DIAG_TABLE_NAME"},
-};
-}  // namespace
-
 AdbcStatusCode SetError(struct AdbcError* error, PGresult* result, const char* 
format,
                         ...) {
+  if (!error && error->release) {

Review Comment:
   ```suggestion
     if (error && error->release) {
   ```
   
   Did you mean this?



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