Re: Tuple data

From: "Emmanuel Charpentier,,," <charpent(at)bacbuc(dot)dyndns(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tuple data
Date: 2000-12-18 08:13:01
Message-ID: 3A3DC70D.7050703@bacbuc.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue wrote :

[ ... ]

> Column order isn't essential in rdbms.

<Nitpicking>

A relation (a table) is a subset of the Cartesain cross-product of the
definition domains of the attributes (columns). Cartesian product being
a commutative operation, "order of columns" does not really exists. Period.

If you impose an order relationship, you *add* inforation to the
structure. That may be OK, but you can't rely on relational algebra to
guarantee your results. You'll have to manage it yourself. (And, yes,
there is relevant algebra for this, too ...).

</Nitpicking>

> Isn't it well known that it's not preferable to use
> 'select *','insert' without column list etc.. in production
> applications ?

100% agreed. Such a notation is an abbreviation. Handy, but dangerous.
IMHO, such checking can (should ?) be done by an algorithm checking for
column *names* before sending the "insert" command.

A partial workaround : inserting in a view containing only the relevant
columns, in a suitable (and known) order.

[ Back to lurking ... ]

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Luis Sousa 2000-12-18 09:16:42 Re: Ocasional problems !!!!
Previous Message Karel Zak 2000-12-18 07:37:21 Re: [HACKERS] Trigger