Search Postgresql Archives

Re: Postgres Equivalent of Oracle Package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 once per 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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux