Re: [PATCHES] ALTER TABLE modifications

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCHES] ALTER TABLE modifications
Дата
Msg-id Pine.LNX.4.44.0311141956540.5327-100000@peter.localdomain
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Background writer process
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.4RC2 regression failur and not running stats collector process