pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Package-support plans?
4+ messages / 3 participants
[nested] [flat]

* Package-support plans?
@ 2018-11-20 06:32  Nicklas Karlsson <nickarls@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Nicklas Karlsson @ 2018-11-20 06:32 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hi,

  (sorry if this has been asked before, "package" gives a lot of hits for
RPMs etc, I couldn't find much on this after 2005 in the lists)

Are there any plans for including Oracle-style packages with
namespace/visibility support at some point or is it just "use schemas"? I
could even live without package-state but I find it frustrating with the
namespace pollution when the application grows.

Thanks in advance,
  Nik

-- 
Nicklas Karlsson, +358 40 5062266
Vaakunatie 10 as 7, 20780 Kaarina

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Package-support plans?
@ 2018-11-20 07:12  Thomas Kellerer <spam_eater@gmx.net>
  parent: Nicklas Karlsson <nickarls@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Thomas Kellerer @ 2018-11-20 07:12 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Nicklas Karlsson schrieb am 20.11.2018 um 07:32:
> Are there any plans for including Oracle-style packages with
> namespace/visibility support at some point or is it just "use
> schemas"? I could even live without package-state but I find it
> frustrating with the namespace pollution when the application grows.
>

If you don't need package-level variables, you could use schemas put functions in different namespaces.

  create schema package_one;
  create function package_one.function_one() as ...;

  create schema package_two;
  create function package_two.function_two() as ...;









^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Package-support plans?
@ 2018-11-20 07:39  Nicklas Karlsson <nickarls@gmail.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Nicklas Karlsson @ 2018-11-20 07:39 UTC (permalink / raw)
  To: spam_eater@gmx.net; +Cc: pgsql-general@lists.postgresql.org

Yes, that it surely one option but is there any grant that can be made on a
function so that it can only be called from within the same schema? Even
then it is a bit cumbersome

On Tue, Nov 20, 2018 at 9:12 AM Thomas Kellerer <spam_eater@gmx.net> wrote:

> Nicklas Karlsson schrieb am 20.11.2018 um 07:32:
> > Are there any plans for including Oracle-style packages with
> > namespace/visibility support at some point or is it just "use
> > schemas"? I could even live without package-state but I find it
> > frustrating with the namespace pollution when the application grows.
> >
>
> If you don't need package-level variables, you could use schemas put
> functions in different namespaces.
>
>   create schema package_one;
>   create function package_one.function_one() as ...;
>
>   create schema package_two;
>   create function package_two.function_two() as ...;
>
>
>
>
>
>
>

-- 
Nicklas Karlsson, +358 40 5062266
Vaakunatie 10 as 7, 20780 Kaarina

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Package-support plans?
@ 2018-11-20 08:22  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Nicklas Karlsson <nickarls@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Pavel Stehule @ 2018-11-20 08:22 UTC (permalink / raw)
  To: nickarls@gmail.com; +Cc: Thomas Kellerer <spam_eater@gmx.net>; pgsql-general <pgsql-general@lists.postgresql.org>

Hi

Ășt 20. 11. 2018 v 8:40 odesĂ­latel Nicklas Karlsson <nickarls@gmail.com>
napsal:

> Yes, that it surely one option but is there any grant that can be made on
> a function so that it can only be called from within the same schema? Even
> then it is a bit cumbersome
>

I have a patch, that can do it - but, probably not before 2 years it will
be in upstream. Although schema doesn't support private object now, it can
be used well for code decomposition and separation.

The packages are too redundant to schemas in Postgres - so it is very low
probably so Postgres will implement packages ever. Much more probable is
state, where Postgres's schemas get some functionality of Oracle's packages.

Regards

Pavel


>
> On Tue, Nov 20, 2018 at 9:12 AM Thomas Kellerer <spam_eater@gmx.net>
> wrote:
>
>> Nicklas Karlsson schrieb am 20.11.2018 um 07:32:
>> > Are there any plans for including Oracle-style packages with
>> > namespace/visibility support at some point or is it just "use
>> > schemas"? I could even live without package-state but I find it
>> > frustrating with the namespace pollution when the application grows.
>> >
>>
>> If you don't need package-level variables, you could use schemas put
>> functions in different namespaces.
>>
>>   create schema package_one;
>>   create function package_one.function_one() as ...;
>>
>>   create schema package_two;
>>   create function package_two.function_two() as ...;
>>
>>
>>
>>
>>
>>
>>
>
> --
> Nicklas Karlsson, +358 40 5062266
> Vaakunatie 10 as 7, 20780 Kaarina
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2018-11-20 08:22 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 06:32 Package-support plans? Nicklas Karlsson <nickarls@gmail.com>
2018-11-20 07:12 ` Thomas Kellerer <spam_eater@gmx.net>
2018-11-20 07:39   ` Nicklas Karlsson <nickarls@gmail.com>
2018-11-20 08:22     ` Pavel Stehule <pavel.stehule@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox