Re: Simple Column reordering

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Subject: Re: Simple Column reordering
Date: 2007-02-23 11:25:22
Message-ID: 1172229922.3874.290.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2007-02-23 at 11:25 +0100, Peter Eisentraut wrote:
> Am Freitag, 23. Februar 2007 09:08 schrieb Simon Riggs:
> > If this is standards-breaking as you say, I would withdraw immediately.
> > I checked the SQL standard and could not see how this would do so. The
> > standard states SELECT * would return columns in order; it doesn't say
> > what that order should be,
>
> b) Otherwise, the <select list> “*” is equivalent to a <value expression>
> sequence in which each <value expression> is a column reference that
> references a column of T and each column of T is referenced exactly once. The
> columns are referenced in the ascending sequence of their ordinal position
> within T.

Which begs the question: what is their ordinal position? If we change
the ordinal position at CREATE TABLE time then the SELECT * would still
work per standard. So the next point is the important one:

> > nor does CREATE TABLE enforce the ordering to
> > be the same as it has specified, AFAICS.
>
> b) The column descriptors of every column of T, according to the Syntax Rules
> and General Rules of Subclause 11.4, “<column definition>”, applied to the
> <column definition>s contained in TEL, in the order in which they were
> specified.

I read both of these phrases prior to posting the original suggestion.

My reading was that this was about constraints on columns, not the
columns themselves, when that phrase was taken in context. I take it you
think that reading was wrong?

I'm not a lawyer, so I'll not argue too close to the edge.

Suggestion withdrawn.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-02-23 11:29:47 Re: Data Restore from WAL
Previous Message Phani Kishore 2007-02-23 11:04:19 help required regarding queryin postgis database from google maps