Skip site navigation (1) Skip section navigation (2)

Re: Check constraints on partition parents only?

From: Nikhil Sontakke <nikkhils(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alex Hunsaker <badalex(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jerry Sievers <gsievers19(at)comcast(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Check constraints on partition parents only?
Date: 2011-07-29 11:41:43
Message-ID: CANgU5ZfUvsfK-km7kOS+ThxheykU_jWsdD1u9PUC2m_dXxoO0w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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)

Regards,
Nikhils

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-07-29 12:19:04
Subject: Re: Check constraints on partition parents only?
Previous:From: Florian PflugDate: 2011-07-29 09:37:06
Subject: Re: XMLATTRIBUTES vs. values of type XML

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group