Re: add column .. default

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: add column .. default
Дата
Msg-id 6065.1055992933@sss.pgh.pa.us
обсуждение исходный текст
Ответ на add column .. default  (Rod Taylor <rbt@rbt.ca>)
Ответы Re: add column .. default  (Rod Taylor <rbt@rbt.ca>)
Список pgsql-hackers
Rod Taylor <rbt@rbt.ca> writes:
> For the update I intend to use double space, as if the user did those
> items as individual commands within the same transaction.

There is no alternative, unless you want the command to be
non-roll-back-able.

> Someone can
> make it more efficient in regards to constraint checks, etc. in the
> future if they want -- I don't intend to.

It'd be nice if you at least ensure that all the constraints are checked
in a single pass over the table (not one per constraint).  Right offhand
I do not see why they couldn't be checked in the same pass that does the
UPDATE.  For extra credit, detect that the default expression is
immutable or stable, and do the checks *once* not once per row.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: allowed user/db variables
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Two weeks to feature freeze