Hello,
I am using PostgreSQL 7.4.7, Perl 3:5.8.5-9, perl-DBI 1.40-5 and PGUUID
(http://gborg.postgresql.org/project/pguuid)
PGUUID provides a user-defined UUID data type for Postgresql.
Perl script....
my $select = "SELECT objectid FROM directory WHERE internalpath=?LIMIT
1";
my $select_handle = $dbh->prepare($select);
my $sresult = $select_handle->execute($dirname);
if( $result != 1 )
{
die "error: select failed on table=directory. dir=$dirname\n";
return;
}
if( $select_handle->rows == 0 )
{
die "error: dirname \"$dirname\" not found in the directory
table.\n";
return;
}
my $rc = $select_handle->rows;
print "row count=$rc\n";
@DBI::data = $select_handle->fetchrow_array();
The call fetchrow_array() results in a segmentation fault.
DBI level 9 trace shows...
dbd_st_execute: statement = >
SELECT objectid FROM directory WHERE internalpath= '/home/test' LIMIT 1<
<- execute= 1 at ./loaddb_rel line 258 via ./loaddb_rel line 106
after select.
>> rows DISPATCH (DBI::st=HASH(0x8be658c) rc1/1 @1 g0 ima4
pid#16546) at ./loaddb_rel line 265 via ./loaddb_rel line 106
-> rows for DBD::Pg::st (DBI::st=HASH(0x8be658c)~0x8be6610)
thr#8912008
dbd_st_rows
<- rows= 1 at ./loaddb_rel line 265 via ./loaddb_rel line 106
>> rows DISPATCH (DBI::st=HASH(0x8be658c) rc1/1 @1 g0 ima4
pid#16546) at ./loaddb_rel line 270 via ./loaddb_rel line 106
-> rows for DBD::Pg::st (DBI::st=HASH(0x8be658c)~0x8be6610)
thr#8912008
dbd_st_rows
<- rows= 1 at ./loaddb_rel line 270 via ./loaddb_rel line 106
row count=1
>> fetchrow_array DISPATCH (DBI::st=HASH(0x8be658c) rc1/1 @1 g1 ima0
pid#16546) at ./loaddb_rel line 274 via ./loaddb_rel line 106
-> fetchrow_array for DBD::Pg::st (DBI::st=HASH
(0x8be658c)~0x8be6610) thr#8912008
dbd_st_fetch
dbih_setup_fbav for 1 fields => 0x8bbfad4
Segmentation fault
I can use PSQL to retrieve rows with the user-defined UUID data type
correctly so the PGUUID functions appear to be working. The postgresql
log shows only an unexpected client EOF.
When single stepping with the perl debugger, the script hangs @
dbih_setup_fbav for 1 fields => ...
Is there any known issues with DBI + Postgresql user-defined types?
Any other way(s) to debug this problem?
Thanks