public inbox for [email protected]help / color / mirror / Atom feed
Catch "RAISE NOTICE" in ODBC application 4+ messages / 2 participants [nested] [flat]
* Catch "RAISE NOTICE" in ODBC application @ 2025-11-30 07:58 Igor Korot <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Igor Korot @ 2025-11-30 07:58 UTC (permalink / raw) To: pgsql-odbc Hi, ALL, How do I do that? Google showed only the libpq way... Thank you. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Catch "RAISE NOTICE" in ODBC application @ 2025-11-30 11:31 Dave Cramer <[email protected]> parent: Igor Korot <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Dave Cramer @ 2025-11-30 11:31 UTC (permalink / raw) To: Igor Korot <[email protected]>; +Cc: pgsql-odbc 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 <[email protected]> wrote: > Hi, ALL, > How do I do that? > > Google showed only the libpq way... > > Thank you. > > > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Catch "RAISE NOTICE" in ODBC application @ 2025-11-30 20:23 Igor Korot <[email protected]> parent: Dave Cramer <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Igor Korot @ 2025-11-30 20:23 UTC (permalink / raw) To: Dave Cramer <[email protected]>; pgsql-odbc 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 <[email protected]> wrote: > I have no idea what psql will do > Dave Cramer > www.postgres.rocks > > > On Sun, 30 Nov 2025 at 12:37, Igor Korot <[email protected]> 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 <[email protected]> >> 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 <[email protected]> wrote: >>> >>>> Hi, ALL, >>>> How do I do that? >>>> >>>> Google showed only the libpq way... >>>> >>>> Thank you. >>>> >>>> >>>> ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Catch "RAISE NOTICE" in ODBC application @ 2025-12-01 10:15 Dave Cramer <[email protected]> parent: Igor Korot <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dave Cramer @ 2025-12-01 10:15 UTC (permalink / raw) To: Igor Korot <[email protected]>; +Cc: pgsql-odbc On Sun, 30 Nov 2025 at 15:24, Igor Korot <[email protected]> wrote: > 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. > As I said, I have no idea. You could just try it. You should ask on the general list. Dave > > > On Sun, Nov 30, 2025 at 12:10 PM Dave Cramer <[email protected]> > wrote: > >> I have no idea what psql will do >> Dave Cramer >> www.postgres.rocks >> >> >> On Sun, 30 Nov 2025 at 12:37, Igor Korot <[email protected]> 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 <[email protected]> >>> 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 <[email protected]> wrote: >>>> >>>>> Hi, ALL, >>>>> How do I do that? >>>>> >>>>> Google showed only the libpq way... >>>>> >>>>> Thank you. >>>>> >>>>> >>>>> ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-12-01 10:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-11-30 07:58 Catch "RAISE NOTICE" in ODBC application Igor Korot <[email protected]> 2025-11-30 11:31 ` Dave Cramer <[email protected]> 2025-11-30 20:23 ` Igor Korot <[email protected]> 2025-12-01 10:15 ` Dave Cramer <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox