Re: Check constraints on non-immutable keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Check constraints on non-immutable keys
Дата
Msg-id 9857.1277908711@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Check constraints on non-immutable keys  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Check constraints on non-immutable keys  (Magnus Hagander <magnus@hagander.net>)
Re: Check constraints on non-immutable keys  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Shouldn't we disallow anything that's not IMMUTABLE in a check constraint?

I think you'd get too many howls of pain ... also, such a restriction is
likely contrary to SQL spec.

The example seems to me to be in the category of "so don't do that"
rather than something that we need to save users from.  Yes, it's
stupid, but for example the very similar check of "a < now()"
would be perfectly safe and arguably useful.
        regards, tom lane


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Keepalives win32
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Check constraints on non-immutable keys