Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mn4Uq-0005OU-Hn for pgsql-general@arkaria.postgresql.org; Tue, 16 Nov 2021 19:52:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mn4Uo-0004Gk-EB for pgsql-general@arkaria.postgresql.org; Tue, 16 Nov 2021 19:51:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mn4Un-0004GV-JL for pgsql-general@lists.postgresql.org; Tue, 16 Nov 2021 19:51:58 +0000 Received: from resqmta-ch2-10v.sys.comcast.net ([2001:558:fe21:29:69:252:207:42]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mn4Uj-0007Lq-P5 for pgsql-general@postgresql.org; Tue, 16 Nov 2021 19:51:57 +0000 Received: from resomta-ch2-20v.sys.comcast.net ([69.252.207.116]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id n4HsmOTE9dtzzn4UdmOeoi; Tue, 16 Nov 2021 19:51:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1637092307; bh=zr7r86lSfoHTdthl1/qv1ebGMlVtNsR+Pe7DLZYhUnI=; h=Received:Received:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type; b=SE4P/G2CvGb73uTdKzGuepeNY7dEzLxSUstraEo/THfMUeihF/IfTLnUDRJLj0uSz DwLWi4n9P+uoF923+YtXKeGBhWPg7wtF9nGEECt8d2Np+8PwdiGXwGyyfFZHxrimUx Ha33fTeL8IfqKl4FLS5/uUqsoLjVNP78mLvq5FubGnKiHEvFr985sExL6Vs/y4Xk14 z5WL8AYl6RydHFnr9Qw8iuPOepV2oeLerhmcmiM+N6AEuiDJ1AG7PCP/jNleqh0sax xdIFVn93XuG700tI7QV2vIzOrq2g5n+Hunm3HAPo2ugJ+47v02Y/RLsA9YwGJQX0b/ YNKL8/V0MUSXA== Received: from oxapp-asc-17o.email.comcast.net ([96.118.219.214]) by resomta-ch2-20v.sys.comcast.net with ESMTPS id n4USmtncswjGqn4UcmxMMZ; Tue, 16 Nov 2021 19:51:47 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvuddrfedvgdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffkjghfufggtgfrkgfoihesrgdtsggsredtjeenucfhrhhomhepffetggfkffcutffqvffjuceorggurghpthhrohhnsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeeuuddvleehheeljeevgfetueeigefgiedtvefgheffleeuheffvdeiffehieettdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeliedruddukedrvdduledrvddugedpvdeitddumeduledumeekgedttdemugdvrgdtmeguughfsgemtggtheegmegriegrtdemjedtheeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepohigrghpphdqrghstgdqudejohdrvghmrghilhdrtghomhgtrghsthdrnhgvthdpihhnvghtpeeliedruddukedrvdduledrvddugedpmhgrihhlfhhrohhmpegruggrphhtrhhonhestghomhgtrghsthdrnhgvthdprhgtphhtthhopehprghvvghlrdhsthgvhhhulhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-Xfinity-VMeta: sc=-100.00;st=legit Date: Tue, 16 Nov 2021 14:51:36 -0500 (EST) From: DAVID ROTH To: Pavel Stehule Cc: Postgres General Message-ID: <578672982.410788.1637092296124@connect.xfinity.com> In-Reply-To: References: <494df2a3-5201-33c6-d973-0e7baa09bb20@rodonnell.ie> <826773243.402693.1637083393436@connect.xfinity.com> Subject: Re: Postgres Equivalent of Oracle Package MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_410787_1199576379.1637092296099" X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev21 X-Originating-IP: 2601:191:8400:d2a0:ddfb:cc54:a6a0:7058 X-Originating-Client: open-xchange-appsuite List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_410787_1199576379.1637092296099 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I can see how schemas can be used to keep related tables and other object t= ogether. I may be missing something but I don't see how they can be used t= o emulate the "once-per-session" behavior of Oracle packages. Have I missed= something? > On 11/16/2021 12:27 PM Pavel Stehule wrote: >=20 >=20 > Hi >=20 > =C3=BAt 16. 11. 2021 v 18:23 odes=C3=ADlatel DAVID ROTH napsal: >=20 > > > 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. > >=20 > > What is the best way of emulating this behavior in Postgresql? > >=20 > > >=20 > you can use a schemas - you can see it in Orafce >=20 > https://github.com/orafce/orafce >=20 > Regards >=20 > Pavel >=20 >=20 ------=_Part_410787_1199576379.1637092296099 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =20 =20
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?
On 11/16/2021 12:27 PM Pavel Stehule <pavel.stehule@gmail.com> wr= ote:


Hi

=C3=BAt 16. 11. 2021 v 18:23 odes=C3=ADlatel DAVID ROTH <adaptron@comcast.net> napsal:
One of the nice things about Oracle packages is that the code is load= ed 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

------=_Part_410787_1199576379.1637092296099--