Search Postgresql Archives

Re: Nested Schemata, in a Standard-Compliant Way?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux