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 <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.

> 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   [EMAIL PROTECTED]


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to