Re: Postgres Equivalent of Oracle Package - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Postgres Equivalent of Oracle Package
Date
Msg-id CAFj8pRAVr97pgvDm+L6+fQgwoXEBvfc2XTJ2YPv8+f3e_dUL3A@mail.gmail.com
Whole thread Raw
In response to Re: Postgres Equivalent of Oracle Package  (DAVID ROTH <adaptron@comcast.net>)
List pgsql-general
Hi

út 16. 11. 2021 v 20:51 odesílatel DAVID ROTH <adaptron@comcast.net> napsal:
I can see how schemas can be used to keep related tables and other object together.  I may be missing something but I don't see how they can be used to emulate the "once-per-session" behavior of Oracle packages. Have I missed something?

There is nothing similar in Postgres.

I am working session variables, that should be created in schema too. As workaround you can use GUC - configuration variables, that can be used for storing private values too.

Regards

Pavel


On 11/16/2021 12:27 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:


Hi

út 16. 11. 2021 v 18:23 odesílatel DAVID ROTH <adaptron@comcast.net> napsal:
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 use a schemas - you can see it in Orafce


Regards

Pavel

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Row estimate on empty tables
Next
From: Tiffany Thang
Date:
Subject: Re: Managing major PostgreSQL upgrades