Re: [PATCHES] ALTER TABLE modifications - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCHES] ALTER TABLE modifications
Date
Msg-id Pine.LNX.4.44.0311141956540.5327-100000@peter.localdomain
Whole thread Raw
List pgsql-hackers
Hannu Krosing writes:

> > AFAICT, this patch does not buy us anything at all.  It's just a different
> > spelling of existing functionality.  We have never done that before.
>
> what about DROP COLUMN - this is also just a different spelling for
>
> SELECT INTO, migrate all constraints, DROP OLD TABLE, RENAME.

No, because DROP COLUMN preserves dependent objects.

> > We cannot possibly leave this patch as is.  People expect in-place column
> > changes.
>
> Does SQL spec even require that SELECT * always returns columns in the
> same order ?

Yes:
           b) Otherwise, the <select list> "*" is equivalent to a <value             expression> sequence in which each
<valueexpression>             is a column reference that references a column of T and             each column of T is
referencedexactly once. The columns             are referenced in the ascending sequence of their ordinal
positionwithin T.
 

> I don't think that relational model assigns any 'order' to columns.

Correct, but SQL is not the relational model or vice versa.

> BTW, SELECT * is just a different spelling of existing functionality ;)

No, there is no other way to get a complete list of columns.  (Hard-coding
does not count.)

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Background writer process
Next
From: Tom Lane
Date:
Subject: Re: 7.4RC2 regression failur and not running stats collector process