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 3E944E43.50801@blueonyxgroup.com
Whole thread Raw
In response to Re: How do you execute a postgresql function from perl?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Responses Re: How do you execute a postgresql function from perl?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-hackers
    Yeah, I tried that. I even used the same syntax that works for Oracle. 
The interface said it couldn't handle BEGIN and END in the sql call. I 
still can't find any syntax that actually executes the function. It's 
actually pretty surprising to me since executing a stored proc is pretty 
basic stuff.Thanks for the help anyway!


Stu

Nigel J. Andrews wrote:
> On Tue, 8 Apr 2003, Stu Krone wrote:
> 
> 
>>    I'm trying to execute a postgresql function from perl. The function 
>>inserts data into two different tables. I prefer this a sopposed to 
>>using two insert statements. Can anyone point me to any information at 
>>all on how to execute postgresql functions from Perl? The code for 
>>Oracle doesn't work. Any help would be appreciated.
>>
>>Stu Krone
>>
> 
> 
> Just submit the SQL for it in the normal manner you use in perl:
> 
> SELECT domyfunc();
> 
> Having been shown some code that runs Oracle procedures recently I think it'll
> be particularly easy to make a set of functions you can use in perl that
> emulates that particular oddity and generate the SQL. If I didn't know it was
> possible to run procedures in Oracle by typing the pl/sql type commands in to
> the command line utility I'd have said that's all they were doing since it
> seems much more sensible to have an interface on the backend that understands
> SQL to do such things rather than SQL and some proprietary language where the
> proprietary language is necessary in order to use stored procs.
> 
> 



pgsql-hackers by date:

Previous
From: "Ron Peacetree"
Date:
Subject: Re: Anyone working on better transaction locking?
Next
From: "Ron Peacetree"
Date:
Subject: Re: Anyone working on better transaction locking?