Thread: Disabling libpq clients stderr output from backend

Disabling libpq clients stderr output from backend

From
"Oberpriller, Wade D."
Date:
Hello,

I have a client C++ program that is built on top of libpq. Whenever I issue
an SQL query that executes a stored procedure that drops tables or creates
tables, I get the NOTICE: messages to appear on the stderr output of my
client propram. Can I turn this off, or redirect it to /dev/null somehow?

Wade Oberpriller                 http://www.storagetek.com
Software Development             Phone: (763) 424-1538
StorageTek: MRDC                        (800) 328-9108 ext. 1538
wade_oberpriller@storagetek.com  Fax:   (763) 391-1095

Re: Disabling libpq clients stderr output from backend

From
Tom Lane
Date:
"Oberpriller, Wade D." <oberpwd@nsc-msg01.network.com> writes:
> I have a client C++ program that is built on top of libpq. Whenever I issue
> an SQL query that executes a stored procedure that drops tables or creates
> tables, I get the NOTICE: messages to appear on the stderr output of my
> client propram. Can I turn this off, or redirect it to /dev/null somehow?

See SetNoticeProcessor (sp?).  Plug in a do-nothing processor and you're
set.

            regards, tom lane