Re: Postgres Equivalent of Oracle Package

Поиск
Список
Период
Сортировка
От Mladen Gogala
Тема Re: Postgres Equivalent of Oracle Package
Дата
Msg-id 87b2142e-276f-bf53-a8e0-f9a84aa9677d@gmail.com
обсуждение исходный текст
Ответ на Postgres Equivalent of Oracle Package  (DAVID ROTH <adaptron@comcast.net>)
Список pgsql-general
On 11/16/21 12:23, DAVID ROTH wrote:
> One of the nice things about Oracle packages is that the code is loaded and global values are set and stored only
onceper session. This is very useful for values that are used repeatedly.
 
>
> What is the best way of emulating this behavior in Postgresql?
>
>

You can create a temporary table with "ON COMMIT PRESERVE ROWS", which 
is visible in a session and cannot cross the session boundary.  Values 
in the table can be queried throughout the session. That is a pretty 
good approximation of the session variables in Oracle.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com




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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: postgresql 9.6x installers for windows are no longer available
Следующее
От: Prathima Mulpuri
Дата:
Сообщение: Re: Account privileges