Re: Check constraints on partition parents only?

Поиск
Список
Период
Сортировка
От Nikhil Sontakke
Тема Re: Check constraints on partition parents only?
Дата
Msg-id CANgU5Zf7Loz+59fqSh4e6N_9e8_Z2JiwzEw6Xv4gWY3P-9O1fw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check constraints on partition parents only?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Check constraints on partition parents only?
Re: Check constraints on partition parents only?
Список pgsql-hackers
> psql=# \d a
>       Table "public.a"
>  Column |  Type   | Modifiers
> --------+---------+-----------
>  b      | integer |
> Check constraints:
>    "achk" CHECK (false)
>    "bchk" CHECK (b > 0)
>
> Is this acceptable? Or we need to put in work into psql to show ONLY
> somewhere in the description? If yes, ONLY CHECK sounds weird, maybe
> we should use LOCAL CHECK or some such mention:
>
> Check constraints:
>    "achk" LOCAL CHECK (false)
>    "bchk" CHECK (b > 0)

I think you need to stick with "ONLY".  Using two different words is
just going to create confusion. You could fool around with where
exactly you put it on the line, but switching to a different word
seems like not a good idea.

Ok, maybe something like:

"achk" (ONLY) CHECK (false)

>>(Also, don't forget you need to hack pg_dump, too.)

Yeah, I have already hacked it a bit. This constraint now needs to be
spit out later as an ALTER command with ONLY attached to it
appropriately. Earlier all CHECK constraints were generally emitted as
part of the table definition itself.

Regards,
Nikhils


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Check constraints on partition parents only?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Check constraints on partition parents only?