Re: Any way to make PG driver obey PrintWarn?

From: Tyler MacDonald <tyler(at)yi(dot)org>
To: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, dbi-users(at)perl(dot)org
Subject: Re: Any way to make PG driver obey PrintWarn?
Date: 2006-02-06 23:47:39
Message-ID: 20060206234738.GU9232@yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Uwe C. Schroeder <uwe(at)oss4u(dot)com> wrote:
> Probably because the notice you see is a notice from the database engine,
> not from the driver.

OK, but in order for them to get to my tty, they have to bubble down
from postgres, through the UNIX/TCP socket I am talking to the driver with,
into DBD::Pg, through DBI, and out through perl's STDERR right? I mean, that
must be right, because if I run my script "2> /dev/null" I don't see this
spam... so it would stand to reason that if DBI provides a "PrintWarn"
option that "controls the printing of warnings recorded by the driver. When
set to a true value the DBI will check method calls to see if a warning
condition has been set."...

So it sounds like DBD::Pg isn't thinking to squealch NOTICEs coming
from the server when I ask it to by turning PrintWarn off.

> You can however turn off those notices in postgresql.conf

Sure I can, or I can do "SET client_min_messages=error", but
shouldn't the DBD::Pg driver do that *for* me when I ask not to see
warnings?

Thanks,
Tyler

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tyler MacDonald 2006-02-06 23:49:36 Re: Should I use PL/PGSQL or Perl/PGSQL?
Previous Message Merlin Moncure 2006-02-06 23:42:53 Re: Should I use PL/PGSQL or Perl/PGSQL?