From: Wolfgang Apolinarski <wolfgang.apolinarski@googlemail.com>
To: pgsql-odbc@postgresql.org
Subject: ODBC - Retrieving info messages - RAISE NOTICE
Date: Thu, 1 Feb 2018 17:45:30 +0100
Message-ID: <005501d39b7c$12bf4010$383dc030$@googlemail.com> (raw)
Hi,
When executing a PL/pgsql query using powershell with ODBC (yes, a somehow special setup), it is possible to register to the event "InfoMessage" (with Register-ObjectEvent) to retrieve all messages that are created for example by using "RAISE NOTICE".
While this works fine when using MS SQL and the SqlConnection (all print statements are retrieved), it does not work with Postgres and the OdbcConnection, here, only the last message ("3") is retrieved, when a statement like
DO $$
RAISE NOTICE '1';
RAISE NOTICE '2';
RAISE NOTICE '3';
END$$;
is executed.
Maybe this is a general constraint when using ODBC, but maybe I am doing something terribly wrong (other than using powershell with Postgresql).
Best regards,
Wolfgang
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: wolfgang.apolinarski@googlemail.com
Subject: Re: ODBC - Retrieving info messages - RAISE NOTICE
In-Reply-To: <005501d39b7c$12bf4010$383dc030$@googlemail.com>
References: <005501d39b7c$12bf4010$383dc030$@googlemail.com>
* 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