From: rob stone <floriparob@gmail.com>
To: Raymond Brinzer <ray.brinzer@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Nested Schemata, in a Standard-Compliant Way?
Date: Wed, 29 Sep 2021 00:13:03 +1000
Message-ID: <0ed7dfc54e499f98eac9904f2cfffbc202722bdb.camel@gmail.com> (raw)
In-Reply-To: <CANasJHnxbKhE+z0Gmcx+A5t-CCsZYzJJhYPR4-syvvOoP8pzjQ@mail.gmail.com>
References: <CANasJHnxbKhE+z0Gmcx+A5t-CCsZYzJJhYPR4-syvvOoP8pzjQ@mail.gmail.com>
Hello Ray,
On Tue, 2021-09-28 at 09:24 -0400, Raymond Brinzer wrote:
> Greetings.
>
>
>
> I'm wondering whether such a feature could be added, without breaking
> either existing code, or compliance with the SQL standard. For
> instance, borrowing :: from languages like Ruby and Perl:
>
> SELECT * FROM ::projects::contacts::people; -- Absolute path
> cd ::projects; -- Session-specific
> SELECT * FROM contacts::people; -- Relative path
>
Double colons are used for casting.
E.g., $1::INET or $1::INTEGER where $1 is a string.
What you are after are sub schemas.
set schema projects;
set subschema contacts;
select * from people;
I don't know enough about the catalogue tables to know if a tree
structure for schemas is possible, the amount of work involved or even
if there is a valid use case.
My 2 cents.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: floriparob@gmail.com, ray.brinzer@gmail.com
Subject: Re: Nested Schemata, in a Standard-Compliant Way?
In-Reply-To: <0ed7dfc54e499f98eac9904f2cfffbc202722bdb.camel@gmail.com>
References: <CANasJHnxbKhE+z0Gmcx+A5t-CCsZYzJJhYPR4-syvvOoP8pzjQ@mail.gmail.com> <0ed7dfc54e499f98eac9904f2cfffbc202722bdb.camel@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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