Re: How to get error message details from libpq based psqlODBC driver (regression)

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>, "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>
Subject: Re: How to get error message details from libpq based psqlODBC driver (regression)
Date: 2020-02-23 19:15:55
Message-ID: 1C5561495CAF43B08ADBD385D63A7D21@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-02-23 19:25:27 Re: Reset DB stats suggestion pg_stat_reset()
Previous Message Adrian Klaver 2020-02-23 18:42:42 Re: Replication: slave server has 3x size of production server?