Re: Happy column adding (was RE: [HACKERS] Happy columndropping)

Поиск
Список
Период
Сортировка
От Jose Soares
Тема Re: Happy column adding (was RE: [HACKERS] Happy columndropping)
Дата
Msg-id 388EF907.65BAD9A4@sferacarta.com
обсуждение исходный текст
Ответ на RE: Happy column adding (was RE: [HACKERS] Happy column dropping)  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers

Don Baccus wrote:

> At 12:29 PM 1/25/00 -0600, Ross J. Reedstrom wrote:
> >On Tue, Jan 25, 2000 at 12:23:15PM -0500, Tom Lane wrote:
>
> >> Well, yeah: wouldn't you expect that "ADD COLUMN x DEFAULT 42" would
> >> cause every row currently existing in the table to acquire x = 42,
> >> rather than x = NULL?  In fact that would *have* to happen to allow
> >> constraints to be added; consider ADD COLUMN x DEFAULT 42 NOT NULL.
>
> >Actually, no I wouldn't expect it. That's mixing DDL and DML in one
> >statement.  I expect the ALTER command to be pure DDL, and the UPDATE
> >to be pure DML.
>
> Hmmm...interesting...is alter table in the standard?

Yes, of course.
...        <alter table statement> ::=             ALTER TABLE <table name> <alter table action>
        <alter table action> ::=               <add column definition>             | <alter column definition>
  | <drop column definition>             | <add table constraint definition>             | <drop table constraint
definition>
...

> Again, my copy
> of Date's SQL 92 primer is somewhere 'wteen Boston, MA and Portland, OR,
> so I can't look myself.   Since you've got the standard available you
> can answer perhaps?

>
> >Ouch, reading standards always makes my brain hurt. Especially how you
> >have to read them upside down. Turns out SELECT INTO is in the standard,
> >but not the way we implement it.
>
> Scary!!! :) :)
>
> - Don Baccus, Portland OR <dhogaza@pacifier.com>
>   Nature photos, on-line guides, Pacific Northwest
>   Rare Bird Alert Service and other goodies at
>   http://donb.photo.net.
>
> ************

José



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jose Soares
Дата:
Сообщение: Re: Happy column adding (was RE: [HACKERS] Happy column dropping)
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: AW: AW: [HACKERS] Some notes on optimizer cost estimates