From: | Stu Krone <skrone(at)blueonyxgroup(dot)com> |
---|---|
To: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How do you execute a postgresql function from perl? |
Date: | 2003-04-11 22:12:25 |
Message-ID: | 1050099146.1111.3.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-04-11 23:06:03 | Re: [GENERAL] medical image on postgreSQL? |
Previous Message | Nigel J. Andrews | 2003-04-11 22:04:46 | Re: How do you execute a postgresql function from perl? |