Re: A VIEW mimicing a TABLE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A VIEW mimicing a TABLE
Дата
Msg-id 6913.1166026097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A VIEW mimicing a TABLE  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
Ответы Re: A VIEW mimicing a TABLE
Re: A VIEW mimicing a TABLE
Список pgsql-general
Rafal Pietrak <rafal@zorro.isa-geek.com> writes:
> I can see that with a VIEW, I can do prity mutch everything I can do
> with a TABLE, so a VIEW mimics a TABLE quite well.... but one feature: a
> default value for a row on INSERT.

You can add a default to a view's column, either the same as the
underlying table's default, or different if you want.

ALTER TABLE view ALTER COLUMN col SET DEFAULT expr

            regards, tom lane

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