Re: Check constraints on partition parents only?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Check constraints on partition parents only?
Дата
Msg-id CA+TgmoYXBi-pgrwyt8UyVfbenQpvOcDyUOAotUROxEwtJxJG+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check constraints on partition parents only?  (Nikhil Sontakke <nikkhils@gmail.com>)
Ответы Re: Check constraints on partition parents only?
Список pgsql-hackers
On Fri, Jul 29, 2011 at 7:41 AM, Nikhil Sontakke <nikkhils@gmail.com> wrote:
> Hi,
>
>>>Any preferences for the name?
>>> connoinh
>>> conisonly
>>> constatic or confixed
>>
>> I'd probably pick conisonly from those choices.
>>
>
> The use of "\d" inside psql will show ONLY constraints without any
> embellishments similar to normal constraints. E.g.
>
>
> ALTER TABLE ONLY a ADD CONSTRAINT achk CHECK (FALSE);
>
> ALTER TABLE a ADD CONSTRAINT bchk CHECK (b > 0);
>
> 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.

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

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

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