Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j5wjh-0002dX-Cu for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2020 19:16:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j5wjf-0005sc-As for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2020 19:16:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j5wje-0005sV-Tf for pgsql-general@lists.postgresql.org; Sun, 23 Feb 2020 19:16:15 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j5wjb-0000ML-EL for pgsql-general@postgresql.org; Sun, 23 Feb 2020 19:16:13 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id E57751B36; Sun, 23 Feb 2020 21:16:08 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5PFUqxZq1dcw; Sun, 23 Feb 2020 21:16:06 +0200 (EET) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 714321B28; Sun, 23 Feb 2020 21:16:06 +0200 (EET) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPSA id 48QZfs0tQ2z3HG; Sun, 23 Feb 2020 21:16:03 +0200 (EET) Message-ID: <1C5561495CAF43B08ADBD385D63A7D21@dell2> From: "Andrus" To: "pgsql-general" , "Adrian Klaver" References: <494B191537234C4A81D7A56848B9946D@dell2> <1aae144e-3b2b-38cc-0b4e-222960ff95a7@aklaver.com> In-Reply-To: <1aae144e-3b2b-38cc-0b4e-222960ff95a7@aklaver.com> Subject: Re: How to get error message details from libpq based psqlODBC driver (regression) Date: Sun, 23 Feb 2020 21:15:55 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1257"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.