Re: [HACKERS] Creating temp tables inside read only transactions

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Darren Duncan'" <darren(at)darrenduncan(dot)net>, "'Christopher Browne'" <cbbrowne(at)gmail(dot)com>
Cc: "'Michael Nolan'" <htfoot(at)gmail(dot)com>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Jeff Davis'" <pgsql(at)j-davis(dot)com>, "'Guillaume Lelarge'" <guillaume(at)lelarge(dot)info>, "'mike beeper'" <mbeeper(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org>, "'PostgreSQL Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Creating temp tables inside read only transactions
Date: 2011-07-11 13:10:57
Message-ID: 013e01cc3fcb$f9c63810$ed52a830$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Christopher Browne wrote:
> Vis-a-vis the attempt to do nested naming, that is "ns1.ns2.table1",
> there's a pretty good reason NOT to support that, namely that this
> breaks relational handling of tables. PostgreSQL is a *relational*
> database system, hence it's preferable for structures to be
> relational, as opposed to hierarchical, which is what any of the
> suggested nestings are.

Organizing the tables into a multi-level namespace, either fixed-depth or variable-depth, rather than using a flat namespace, does not make the database any less relational, because the above definition and any others still hold.

The "less relational" argument above is a red herring or distraction. One can argue against namespace nesting just fine without saying that.

-- Darren Duncan

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I agree with Darren.

One thought that came to my mind was to use a different separator between two namespaces and/or between the database identifier and the rest of the "path".
Examples:

ns1!ns2.table

OR

database(at)ns1(dot)table

OR

database(at)ns1!ns2(dot)table

I've been following only some of the discussion but it seems that much ambiguity would be lost by using different separators. Schemas themselves are already non-standard so it isn't like we are constrained here in what is chosen.

Just some quick thoughts I've had but haven't fully considered how they would fit in to the existing setup. But is there is any major reason why choosing different separators would not work?

Also, within search_path, some form of wild-card selector would be desirable: ns1!*. I'm not opposed to having to be explicit about the search_path in order to avoid name collisions; though it would be nice if VIEWS had some kind of "SET" syntax, like functions do, so that the definer can specify the search_path that the view will resolve against.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Florian Pflug 2011-07-11 13:17:10 Re: [HACKERS] Creating temp tables inside read only transactions
Previous Message Jignesh Ramavat 2011-07-11 07:44:03 help for xml create in postgresql

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-07-11 13:17:10 Re: [HACKERS] Creating temp tables inside read only transactions
Previous Message Florian Weimer 2011-07-11 11:25:01 Re: reducing the overhead of frequent table locks, v4