Re: How do you execute a postgresql function from perl?

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: How do you execute a postgresql function from perl?
Дата
Msg-id Pine.LNX.4.21.0304091731450.19529-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на How do you execute a postgresql function from perl?  (Stu Krone <skrone@blueonyxgroup.com>)
Ответы Re: How do you execute a postgresql function from perl?
Список pgsql-hackers
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.


-- 
Nigel J. Andrews



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Ron Peacetree"
Дата:
Сообщение: Re: No merge sort?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Anyone working on better transaction locking?