Обсуждение: NOTICE-messages in C++

Поиск
Список
Период
Сортировка

NOTICE-messages in C++

От
Colin Taylor
Дата:
Hi postgreSQL'ers,
How can I catch NOTICE messages from the backend using C++.
I am sending the query "show DateStyle".
The logs show the NOTICES message being returned by the backend.
But I cannot retrieve the message into the C++ code.
I am using the PQ++ libraries.
Thanx,
Colin

Re: NOTICE-messages in C++

От
Tom Lane
Дата:
Colin Taylor <Colin_Taylor@portasystemsdev.com> writes:
> How can I catch NOTICE messages from the backend using C++.

There is a provision in libpq to let the application install its own
callback routine for handling NOTICE messages.  But AFAIR, libpq++
doesn't expose that libpq feature :-(.  Feel free to contribute a fix.

            regards, tom lane

Re: NOTICE-messages in C++

От
Michael Meskes
Дата:
On Thu, Oct 19, 2000 at 10:54:06AM +0100, Colin Taylor wrote:
> How can I catch NOTICE messages from the backend using C++.
> ...

I never used libpq++ but I know how it's done with libpq. Just look into
file src/interfaces/ecpg/lib/connect.c function ECPGconnect to see how to
install your own notice handler. To be honest, I did not write the code my
self, but Christof Petig <christof.petig@wtal.de> did. :-)

Michael
--
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

how can I unsuscribe from the list?

От
Fernando Caamaño
Дата:
thank you
Fernando Caamaño
Programador web
Interweb Research
www.interweb-research.net