public inbox for pgsql-odbc@postgresql.org
help / color / mirror / Atom feedFrom: Igor Korot <ikorot01@gmail.com>
To: Dave Cramer <davecramer@postgres.rocks>
To: PostgreSQL ODBC list <pgsql-odbc@postgresql.org>
Subject: Re: Catch "RAISE NOTICE" in ODBC application
Date: Sun, 30 Nov 2025 12:23:59 -0800
Message-ID: <CA+FnnTzpGzMLMMH1HU_cF5y=MmydwVSuffmfhvDsAdqK9WAQcA@mail.gmail.com> (raw)
In-Reply-To: <CADK3HHLJztDGzsLiS7uWSY08o4H8_k-3UiMj2Gpx1ocz-OeqdQ@mail.gmail.com>
References: <CA+FnnTxse=q=47B7hbBKnJXeCy_GpyAyZ7hrAOD54nDSzYqhQA@mail.gmail.com>
<CADK3HH+MkPAaTkZ+Ay82Ch7bdN86RB2swUoD7p2-_2q_UGk=wA@mail.gmail.com>
<CA+FnnTyxiLERQav34HeHg=omOP68n36sqXte0JRYegVi0eFw_A@mail.gmail.com>
<CADK3HHLJztDGzsLiS7uWSY08o4H8_k-3UiMj2Gpx1ocz-OeqdQ@mail.gmail.com>
Hi, Dave,
Let’s say I catch CREATE TABLE DDL command and I ran create table inside my
program.
It will be caught and I can process it with that call.
Now what would happen if I run CREATE TABLE inside psql shell?
It will raise the notice but will I be able to catch it?
Thank you.
On Sun, Nov 30, 2025 at 12:10 PM Dave Cramer <davecramer@postgres.rocks>
wrote:
> I have no idea what psql will do
> Dave Cramer
> www.postgres.rocks
>
>
> On Sun, 30 Nov 2025 at 12:37, Igor Korot <ikorot01@gmail.com> wrote:
>
>> Hi,
>>
>> Will it catch it if the event occur inside the application only or from
>> psql as well?
>>
>> Thank you.
>>
>>
>> On Sun, Nov 30, 2025 at 3:31 AM Dave Cramer <davecramer@postgres.rocks>
>> wrote:
>>
>>> ChatGPT shows this:
>>>
>>> SQLGetDiagRec(
>>> SQL_HANDLE_STMT, // statement handle
>>> hstmt,
>>> iRecord, // record number, starting at 1
>>> SqlState,
>>> &NativeError,
>>> MessageText,
>>> BufferLength,
>>> &TextLengthPtr
>>> );
>>>
>>> Notices will have:
>>>
>>> -
>>>
>>> SqlState = "00000"
>>> -
>>>
>>> NativeError = 0
>>> -
>>>
>>> MessageText = "<your NOTICE text>"
>>>
>>>
>>> -
>>>
>>> Dave Cramer
>>> www.postgres.rocks
>>>
>>>
>>> On Sun, 30 Nov 2025 at 02:58, Igor Korot <ikorot01@gmail.com> wrote:
>>>
>>>> Hi, ALL,
>>>> How do I do that?
>>>>
>>>> Google showed only the libpq way...
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
reply
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 using the --to and --cc options:
reply via email
To: pgsql-odbc@postgresql.org
Cc: ikorot01@gmail.com, davecramer@postgres.rocks
Subject: Re: Catch "RAISE NOTICE" in ODBC application
In-Reply-To: <CA+FnnTzpGzMLMMH1HU_cF5y=MmydwVSuffmfhvDsAdqK9WAQcA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox