[rt.cpan.org #18900] DBD::Pg no longer reporting line numbers on warn

"Guest via RT" <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
Mon Apr 24 14:11:31 2006: Request 18900 was acted upon.
Transaction: Ticket created by guest
       Queue: DBD-Pg
     Subject: DBD::Pg no longer reporting line numbers on warn
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18900 >


I'll describe this as best I can. Somewhere between DBD::Pg version 1.32
and 1.41 (and still existing in 1.48), errors no longer report their
line numbers. For example this script :

  #!/usr/bin/perl
  use DBI;

  $d = DBI->connect('DBI:Pg:dbname=template1','postgres','');
  $q = $d->selectall_arrayref('select foo from bar');

returns this error under DBD::Pg 1.32

  DBD::Pg::db selectall_arrayref failed: ERROR:  relation 
  "bar" does not exist at ./test.pl line 7.

and this error under DBD:: 1.41 and later

  DBD::Pg::db selectall_arrayref failed: ERROR:  relation 
  "bar" does not exist

I've been able to "make install" on different DBD::Pg versions to test
this and I can make this error appear and disappear just by changing my
version of DBD::Pg, leaving all other variables the same. Here's some
other information about my setup:

  OS: Darwin Kernel Version 8.6.0 (Mac OS X 10.4.6) powerpc
  Perl v5.8.6 built for darwin-2level 
    (manual build, not what is shipped by Apple)
  DBI 1.50 
  DBD::Pg 1.41 (1.41 or greater to demonstrate the bug)

Needless to say, not having a filename and line number during testing of
a large project makes it next to impossible to debug things. It seems to
me that the error is being manifested by DBD::Pg but may actually be
inside DBI. This sort of debugging is not within my abilities. Hopefully
you will be able to reproduce this with my code above. I've been able to
verify that this is happening on Debian Linux, so I think it's
independent of the OS versrion.

Thanks for your help.
--Joel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.