From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | WadeDare4703 <wadedare4703(at)comcast(dot)net> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Name spacing functions and stored procedures |
Date: | 2015-03-19 03:06:28 |
Message-ID: | CAKFQuwbrqXNzVdpSzvA9N9dDAn3NSD1jUxZ2DObieEX8xpgqbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wednesday, March 18, 2015, WadeDare4703 <wadedare4703(at)comcast(dot)net> wrote:
> I don't understand. What is wrong with having a schema which holds no
> data? Schemas are cheap.
>
> ------------------------------
> *From: *"Tim Uckun" <timuckun(at)gmail(dot)com
> <javascript:_e(%7B%7D,'cvml','timuckun(at)gmail(dot)com');>>
> *To: *"pgsql-general" <pgsql-general(at)postgresql(dot)org
> <javascript:_e(%7B%7D,'cvml','pgsql-general(at)postgresql(dot)org');>>
> *Sent: *Wednesday, March 18, 2015 6:56:55 PM
> *Subject: *[GENERAL] Name spacing functions and stored procedures
>
> What do you guys do to namespace your functions so that they are not
> jumbled in with the system functions and also somewhat hierarchically
> organized.
>
> Obviously it's possible to create schemas for different namespaces but
> that can lead to a lot of schemas which hold no data. The other way is to
> simply name your functions like _lib_etl_csv_import_weird_data_format but
> that's not too much fun either.
>
> Just curious how other people deal with the issue.
>
>
Create an extension?
Barring that a dedicated schema without user data has desirable properties
whether you manage it manually or via an extension. The former ways allows
you to write a migration script using drop schema and install everything
from scratch. While not useable in all cases it can be done.
I do wish schemas had some additional properties, like being able to
readily specify (if not enforce) private versus public functions, for
visibility during schema browsing, or creating a hierarchy which too would
be visible in browsing. This is what I think you are wishing for as well.
Something like Java packages.
I think you can do the naming but tooling support is non-existent and, if
it's not readily provided in core and used by psql or pgadmin it's unlikely
other tools would want to write their own.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2015-03-19 03:32:56 | Re: Archeiving and Purging |
Previous Message | WadeDare4703 | 2015-03-19 02:06:09 | Re: Name spacing functions and stored procedures |