Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKXBs-0003pu-Ap for pgsql-odbc@arkaria.postgresql.org; Tue, 05 Jul 2016 20:43:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKXBr-0003B9-0g for pgsql-odbc@arkaria.postgresql.org; Tue, 05 Jul 2016 20:43:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKXBU-0002mt-5u for pgsql-odbc@postgresql.org; Tue, 05 Jul 2016 20:43:08 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.122]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKXBR-0000XI-NL for pgsql-odbc@postgresql.org; Tue, 05 Jul 2016 20:43:07 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 57EC0B47; Tue, 5 Jul 2016 23:43:04 +0300 (EEST) 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 3dkQF85vKFjX; Tue, 5 Jul 2016 23:43:02 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 443C7B37; Tue, 5 Jul 2016 23:43:02 +0300 (EEST) X-SMTP-Auth-NETI-Businessmail: no Received: from dell2 (66.63.196.88.sta.estpak.ee [88.196.63.66]) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPS id EA6332B1; Tue, 5 Jul 2016 23:42:59 +0300 (EEST) Message-ID: From: "Andrus" To: , "Adrian Klaver" References: <6BCE831703094A8287071F2E5DAB4C8C@dell2> <292539c2-5a39-0b56-fb9f-2ec2e13b0674@aklaver.com> <48fa3b3c-462c-2b2d-7dc9-c0f08883db5e@aklaver.com> In-Reply-To: <48fa3b3c-462c-2b2d-7dc9-c0f08883db5e@aklaver.com> Subject: Re: How to get correct error message before logging to database Date: Tue, 5 Jul 2016 23:42:54 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1257"; reply-type=response 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 X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Hi! >That is many versions past. The only thing I can think of at the moment is: >https://odbc.postgresql.org/docs/release.html >psqlODBC 09.05.0100 Release >Changes: > Use libpq for all communication with the server > Previously, libpq was only used for authentication. Using it for all > communication lets us remove a lot of duplicated code. libpq is now > required for building or using libpq. >You might try the version immediately preceding the above: >psqlODBC 09.03.0400 >to see if you get the old behavior or new. 09.03.0400 returns proper error message on login with invalid server address: could not translate host name "xxx" to address: Unknown host AERROR() returns also sql error code. How to get proper error message in 09.05.0300 ? Maybe libpq does not return error messages before connection is established. I can post odbc log if this helps. Andrus. -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc