Re: check

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: check
Дата
Msg-id 20020617075412.A49868-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на check  (Matt <matthew.berardi@weilpublishing.com>)
Список pgsql-sql
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