Re: check

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: check
Дата
Msg-id
20020617075412.A49868-100000@megazone23.bigpanda.com
Ответ на
check (Matt)
Список
Дерево обсуждения
check Matt <matthew.berardi@weilpublishing.com>
Re: check Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: check Manfred Koizar <mkoi-pg@aon.at>
On Fri, 14 Jun 2002, Matt wrote:

> how would you go about enforcing the default value:
>
> I have a nextval('seq') as my default and on an insert I don't want any
> other value to be allowed.

Don't do a default, do a before trigger that sets the value so that even
if a value is specified it uses the sequence anyway (or you could
potentially check that it's currently null and error I guess as well).



В списке pgsql-sql по дате отправления
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: check
От: Manfred Koizar
Дата:
Сообщение: Re: check
FAQ