From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Swaha Miller <swaha(dot)miller(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: support for CREATE MODULE |
Date: | 2022-02-04 23:33:48 |
Message-ID: | 20220204233348.GB1535307@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 04, 2022 at 05:12:43PM -0500, Tom Lane wrote:
> If we invent modules I think they need to work more like extensions
> naming-wise, ie they group objects but have no effect for naming.
> Alternatively, you could insist that a module *is* a schema for naming
> purposes, with some extra properties but acting exactly like a schema
> for naming. But I don't see what that buys you that you can't get
> from an extension that owns a schema that contains all its objects.
>
> On the whole I'm kind of allergic to inventing an entire new concept
> that has as much overlap with extensions as modules seem to. I'd
> rather try to understand what functional requirements we're missing
> and see if we can add them to extensions. Yeah, we won't end up being
> bug-compatible with Oracle's feature, but that's not a project goal
> anyway --- and where we have tried to emulate Oracle closely, it's
> often not worked out well (poster child: to_date).
If I'm understanding correctly, you are suggesting that CREATE MODULE would
be more like creating an extension without a control file, installation
script, etc. Objects would be added aѕ members with something like ALTER
MODULE ADD, and members could share properties such as access control. And
this might be possible to do by enhancing CREATE EXTENSION instead of
creating a new catalog, dependency type, etc.
I think this could be a nice way to sidestep the naming resolution problems
discussed upthread while still allowing folks to group objects together in
some meaningful way. Also, while it might be nice to have separate CREATE
EXTENSION and CREATE MODULE commands, perhaps they would use roughly the
same code paths behind the scenes.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-02-04 23:41:21 | Re: Support tab completion for upper character inputs in psql |
Previous Message | Jim Mlodgenski | 2022-02-04 23:25:31 | Re: support for CREATE MODULE |