From: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
To: Andrus <kobruleht2@hot.ee>
Cc: pgsql-odbc@postgresql.org
Subject: Re: How to fix psqlODBC driver regression to get error message details
Date: Thu, 27 Feb 2020 11:43:54 +0900
Message-ID: <b1cccf22-4e93-7d6e-553e-61336e45fe0d@dream.email.ne.jp> (raw)
In-Reply-To: <00B7D82CD18C4FF2B2F462BA277CADED@dell2>
References: <00B7D82CD18C4FF2B2F462BA277CADED@dell2>
Hi Andrus,
Could you try the test driver if I provide a test driver on Windows?
regards,
Hiroshi Inoue
On 2020/02/23 7:43, Andrus wrote:
> Hi!
>
> I'm looking for a way to fix psqlODBC driver regression.
>
> Starting at psqlODBC 09.05.0100 when psqlODBC driver uses libpq for all
> operations (earlier versions used libpg only for authentication) ODBC
> client
> does not show error message details.
>
> For example, users got only generic error message like
>
> Connectivity error: ERROR: insert or update on table "mytable"
> violates
> foreign key constraint "mytable_myfield_fkey
>
> Error message details like
>
> Key (myfield)=(mykeyvalue) is not present in table "mymastertable".;
>
> are no more returned.
>
> How to detailed error message or at least only bad key value "mykeyvalue"
> which is returned in error message details ?
>
> Some ideas:
>
> 1. First versions of libpq based ODBC drivers returned same error
> message "no resource found" for all errors. Hiroshi has fixed it it
> later versions. Maybe psqlODBC code can fixed to restore pre-libpq
> behaviour.
>
> 2. Maybe analyzing odbc logs from pre and after 09.05.0100 drivers may
> provide solution. I can provide ODBC log files.
>
> 3. psqlODBC allows to pass parameters to libpq from connection string.
> Maybe some libpq parameter can fix this.
>
> 4. Maybe some Postgres query, postgres extension or direct odbc or
> libpq call can used to return last error message details like Windows
> API GetLastError() or Unix global errno.
>
> 5. Maybe it is possible to to create method which returns error
> message detals from postgres log file.
>
> Postgres 12.2 and latest psqlODBC driver 12.01.0000 are used.
> psqlODBC is called from Visual FoxPro
>
> Andrus.
>
> Posted also in
>
> https://stackoverflow.com/questions/60357505/how-to-fix-psqlodbc-driver-regression-to-get-error-mess...
>
>
> and in pgsql-general mailist list.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: h-inoue@dream.email.ne.jp, kobruleht2@hot.ee
Subject: Re: How to fix psqlODBC driver regression to get error message details
In-Reply-To: <b1cccf22-4e93-7d6e-553e-61336e45fe0d@dream.email.ne.jp>
References: <00B7D82CD18C4FF2B2F462BA277CADED@dell2> <b1cccf22-4e93-7d6e-553e-61336e45fe0d@dream.email.ne.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox