&main::execute undefined? - Mailing list pgsql-general

From Andrew Magnus
Subject &main::execute undefined?
Date
Msg-id 20021121053733.33885.qmail@web21503.mail.yahoo.com
Whole thread Raw
Responses Re: &main::execute undefined?
List pgsql-general

Ok, I'm running Postgres and RH8 right out-of-the-box.  DBD::Pg is installed, and I'm using Perl 5.8 -- all right out-of-the-box.  When my script gets to this line:

 

$statementH = execute() || die $statementH->errstr ;  # this is line 10 btw

 

I get:

 

Undefined subroutine &main::execute called at ./test.pl line 10.

 

As far as I can tell, it should work --but doesn't so I must be missing something.  If you want to tackle this one, everything is right below:  (PS:  the query going into $sql I got with help of you all, so thanks!)

========

#! /usr/bin/perl -w

use DBI ;

$dbH = (DBI->connect("DBI:Pg:dbname=lanparty-reservations","andrew","shrp1234")) ;
$sql = "select c.relname as table from pg_class c where c.relkind = 'r' and c.relname !~ '^pga_' and c.relname !~ '^pg_'" ;

$statementH = $dbH->prepare($sql) ;
$statementH = execute() || warn $statementH->errstr ;



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Dumb Newbie Question - Mandrake 9.0 / PGSQL 7.2
Next
From: Jean-Christian Imbeault
Date:
Subject: bug: select date 'infinity' gives error