Re: Using Temporary Tables in postgres functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using Temporary Tables in postgres functions
Дата
Msg-id 23176.1169823452@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using Temporary Tables in postgres functions  (Mario Splivalo <mario.splivalo@mobart.hr>)
Список pgsql-sql
Mario Splivalo <mario.splivalo@mobart.hr> writes:
> On Thu, 2007-01-25 at 11:09 -0500, Tom Lane wrote:
>> I believe the problem is that for a SQL function we parse the whole
>> function body before executing any of it.  So you'd need to split this
>> into two separate functions.

> Having two function complicates, a bit, interface between applicaation
> and the database. But, then again, If I split it in two functions, then
> one with the UPDATE still can't find temp table referenced in other
> function, right?

It can as long as the table already exists when the function is entered.
        regards, tom lane


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

Предыдущее
От: "Rob V"
Дата:
Сообщение: Re: LEFT Join Question
Следующее
От: Luís Sousa
Дата:
Сообщение: Function returning SETOF using plpythonu