Re: How do you execute a postgresql function from perl? - Mailing list pgsql-hackers

From Nigel J. Andrews
Subject Re: How do you execute a postgresql function from perl?
Date
Msg-id Pine.LNX.4.21.0304112259460.31910-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: How do you execute a postgresql function from perl?  (Stu Krone <skrone@blueonyxgroup.com>)
Responses Re: How do you execute a postgresql function from perl?  (Stu Krone <skrone@blueonyxgroup.com>)
Re: How do you execute a postgresql function from perl?  (Stu Krone <skrone@blueonyxgroup.com>)
List pgsql-hackers

I meant to give a perl example.

Using DBI:

$sth = $dbh->prepare('select myfunc2(?)');
$rv = $sth->execute($myvar);
print "Number rows = ", $sth->rows, "\n";
while ($data = $sth->fetchrow_array) {print "Data: ", $data[0], "\n";
}
$sth->finish;

I can't remember the Pg.pm syntax, I only see that in support mode at the
moment so don't really pay much attention to it.


-- 
Nigel J. Andrews



pgsql-hackers by date:

Previous
From: Kevin Brown
Date:
Subject: Re: Anyone working on better transaction locking?
Next
From: Greg Stark
Date:
Subject: Re: [GENERAL] medical image on postgreSQL?