Errors/Warnings missing line numbers

Joel Richard <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
Good morning,

I was wondering if anyone else is experiencing this error. I reported  
it to the maintainers of DBD::Pg last week through CPAN but have  
heard no response.

Basically since upgrading to DBD::Pg 1.41 or later (I'm now on 1.48),  
I don't get line numbers when there's an error in my SQL statement.  
For example, instead of getting:

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

I'm now getting:

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

This is the script I'm using:

   #!/usr/bin/perl
   use DBI;

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

I can't find any information on the web regarding this. Either no  
one's noticed this or I can't search the web or I'm just an acute  
case of RTFM syndrome. :) However, I must say that I can reproduce  
this error by having two directories of DBD::Pg source code (1.32 and  
1.41 or greater) and if I do a make install in 1.32 and run a test  
script, the line number appears. If I then make install in 1.41, the  
line number disappears.

Can anyone shed some light on this? I have a set of perl modules that  
are about 20,000 lines long and it's next to impossible to debug things.

This error can be manifested both at the command line and in Apache's  
error_log file. Here's my setup, although this is a problem on both  
Mac OS X and Debian Linux (Sarge).

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)

Thanks for any 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.