Re: Function error

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Function error
Дата
Msg-id CAKFQuwY+FwChU7zXB=FXrYjLsa+dvthnFCWf=4OYncKD0XqD=w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function error  (Sachin Srivastava <ssr.teleatlas@gmail.com>)
Список pgsql-general
On Wed, Jan 13, 2016 at 10:06 PM, Sachin Srivastava <ssr.teleatlas@gmail.com> wrote:
Dear Albe,

Thanks for your support !!!

In my function the problem is that global variables defined inside the function. These variables are visible to functions defined inside a function.

​Holy Crap...PostgreSQL functions support closures and global variables?  Who knew?  Well, aside from that fact that relations are global, anyway...

The problem you seem to have is trying to do something in PostgreSQL exactly like you'd do it in Oracle.  While I'm sure many things can be ported over you seem to have stumbled upon one of those things that likely will need to be written using PostgreSQL idioms.

​David J.​

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

Предыдущее
От: Sachin Srivastava
Дата:
Сообщение: Re: Function error
Следующее
От: David Rowley
Дата:
Сообщение: Re: Why PG uses nested-loop join when no indexes are available?