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



Reply via email to