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

From Stu Krone
Subject Re: How do you execute a postgresql function from perl?
Date
Msg-id 1050099146.1111.3.camel@localhost.localdomain
Whole thread Raw
In response to Re: How do you execute a postgresql function from perl?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-hackers
Nigel,
Thank you very much for the information. I'm going to try your example.
It's been driving me crazy that I couldn't get it to work, because it's
pretty basic functionality. I'll code it this weekend and let you know
what happens.

Thanks again,

Stu Krone


On Fri, 2003-04-11 at 15:04, Nigel J. Andrews wrote:
> 
> 
> 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: "Ron Peacetree"
Date:
Subject: Re: No merge sort?
Next
From: "Ned Lilly"
Date:
Subject: MySQL and RHDB news; 8.0 troll