| From: | rob stone <floriparob(at)gmail(dot)com> | 
|---|---|
| To: | Raymond Brinzer <ray(dot)brinzer(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Nested Schemata, in a Standard-Compliant Way? | 
| Date: | 2021-09-28 14:13:03 | 
| Message-ID: | 0ed7dfc54e499f98eac9904f2cfffbc202722bdb.camel@gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Raymond Brinzer | 2021-09-28 14:14:47 | Re: Nested Schemata, in a Standard-Compliant Way? | 
| Previous Message | Tom Lane | 2021-09-28 13:36:20 | Re: Nested Schemata, in a Standard-Compliant Way? |