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

From: Christopher Browne <cbbrowne(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Darren Duncan <darren(at)darrenduncan(dot)net>, 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 14:21:54
Message-ID: CAFNqd5UO5vgqSSNR6TRhezrVQ2j0RWhohFjmfK0DdpYCBaxeQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Jul 11, 2011 at 10:12 AM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
> On Jul11, 2011, at 07:08 , Darren Duncan wrote:
>> 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.
>>
>> A relational database is a database in which all data is kept in
>> relation-typed variables, which SQL calls tables, and you can perform
>> all queries and updates with just relation-valued expressions and
>> statements.
>>
>> 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 point was not, I think, that tables aren't suddenly relations once
> namespaces are nested, but that the data model of the dbms *itself*,
> i.e. the data model that defines the relationship between namespaces,
> types, columns, type, ... becomes harder to map to the relational model.

Just so.

It's not that it suddenly "becomes no longer relational".

Rather, the argument is that "it was intentional for the structuring
of table naming to, itself, be relational," and changing that
definitely has some undesirable characteristics.

The need for recursive queries is the most obvious "undesirable", but
it's not the only undesirable thing, by any means.

Sure, there's some cool stuff that we can get out of nested
namespaces, but I think we'd pay a pretty big price for it, and it
shouldn't be treated as "obvious" that:
a) It's a good thing to do so,
b) It is desirable to do so,
c) There will be agreement to do so.

To the contrary, there are pretty good reasons to reject the idea.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2011-07-11 16:16:19 Two PHP projects looking for PostgreSQL help
Previous Message Florian Pflug 2011-07-11 14:12:17 Re: [HACKERS] Creating temp tables inside read only transactions

Browse pgsql-hackers by date

  From Date Subject
Next Message jcamera 2011-07-11 14:33:46 pg_xlog error
Previous Message Magnus Hagander 2011-07-11 14:20:18 Re: Full GUID support