Re: Package-support plans?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: nickarls(at)gmail(dot)com
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Package-support plans?
Date: 2018-11-20 08:22:19
Message-ID: CAFj8pRB0Q02=vtHh4AW-hWVhjjQdanrPM8A4bLQoJSUwmxpRhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

út 20. 11. 2018 v 8:40 odesílatel Nicklas Karlsson <nickarls(at)gmail(dot)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(at)gmx(dot)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
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2018-11-20 09:19:55 Re: pgconf eu 2018 slides entry missing from https://wiki.postgresql.org/wiki/PostgreSQL_Related_Slides_and_Presentations
Previous Message Nicklas Karlsson 2018-11-20 07:39:23 Re: Package-support plans?