Re: Check constraints on non-immutable keys

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Check constraints on non-immutable keys
Дата
Msg-id AANLkTilJjP2iUBCcrjTqMKRN9DUKl1jxGWiTYAYKNgzV@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check constraints on non-immutable keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Check constraints on non-immutable keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 30, 2010 at 16:38, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Really? That sounds strange, but I can't claim to k now the 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

In that case, should we at least throw a warning?


> stupid, but for example the very similar check of "a < now()"
> would be perfectly safe and arguably useful.

Well, things like timezone settings could come in effect there as well...




-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


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

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