Thread: Any way to make PG driver obey PrintWarn?
I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, yet I am still getting spammed with messages like this: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "aus_flag_pkey" for table "aus_flag" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "aus_password_crypt_pkey" for table "aus_password_crypt" etcetcetc... rt.cpan.org doesn't show any active bugs about this. Is this a known issue? Is it even a bug or am I doing something wrong? Why does Pg feel it neccessary to tell me that these implicit indexes are being created anyways? Thanks, Tyler
Probably because the notice you see is a notice from the database engine, not from the driver. You can however turn off those notices in postgresql.conf On Monday 06 February 2006 14:30, Tyler MacDonald wrote: > I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, > yet I am still getting spammed with messages like this: > > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "aus_flag_pkey" for table "aus_flag" NOTICE: CREATE TABLE / PRIMARY KEY > will create implicit index "aus_password_crypt_pkey" for table > "aus_password_crypt" > > etcetcetc... > > rt.cpan.org doesn't show any active bugs about this. Is this a known issue? > Is it even a bug or am I doing something wrong? Why does Pg feel it > neccessary to tell me that these implicit indexes are being created > anyways? > > Thanks, > Tyler > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- Open Source Solutions 4U, LLC 1618 Kelly St Phone: +1 707 568 3056 Santa Rosa, CA 95401 Cell: +1 650 302 2405 United States Fax: +1 707 568 6416
Uwe C. Schroeder <uwe@oss4u.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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, > yet I am still getting spammed with messages like this: > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > ... > rt.cpan.org doesn't show any active bugs about this. Is this a known issue? It is now. :) This is a bug in DBD::Pg. I just committed a fix to cvs for it, so this will work properly in version 1.44, which is just around the corner. Thank you for the report. If you want, you can fill out a bug on rt.cpan.org for it, but if not, that's fine too. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200602061916 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFD5+cNvJuQZxSWSsgRAtHQAJ46pbdh3SgFak9RvHGu2ZJcOiT7OgCg7p1j vNiJP5Erc78SEFM45FSQovY= =p+Sc -----END PGP SIGNATURE-----