Re: How to get error message details from libpq based psqlODBC driver (regression) - Mailing list pgsql-general

From Andrus
Subject Re: How to get error message details from libpq based psqlODBC driver (regression)
Date
Msg-id 1C5561495CAF43B08ADBD385D63A7D21@dell2
Whole thread Raw
In response to Re: How to get error message details from libpq based psqlODBC driver(regression)  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hi!

>I don't have an answer for you. There maybe someone else on this list that
>could help, though I think your best bet would be to ask the question again
>on the pgsql-odbc list.

I posted it in pgsql-odbc list.

In pgsql odbc source code file connection.c: line 866

contains:

errprimary = PQresultErrorField(pgres, PG_DIAG_MESSAGE_PRIMARY);

which probably gets only primary error message.
To get error message detail,  PG_DIAG_MESSAGE_DETAIL should used according 
to https://www.postgresql.org/docs/current/libpq-exec.html.
Unfortunately PG_DIAG_MESSAGE_DETAIL  is not used in pgsql-odbc source code.

Andrus. 




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Replication: slave server has 3x size of production server?
Next
From: Adrian Klaver
Date:
Subject: Re: Reset DB stats suggestion pg_stat_reset()