From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Recast "ONLY" column CHECK constraints as NO INHERIT |
Date: | 2012-04-21 02:57:47 |
Message-ID: | E1SLQWB-0007C6-Bo@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Recast "ONLY" column CHECK constraints as NO INHERIT
The original syntax wasn't universally loved, and it didn't allow its
usage in CREATE TABLE, only ALTER TABLE. It now works everywhere, and
it also allows using ALTER TABLE ONLY to add an uninherited CHECK
constraint, per discussion.
The pg_constraint column has accordingly been renamed connoinherit.
This commit partly reverts some of the changes in
61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac, particularly some pg_dump and
psql bits, because now pg_get_constraintdef includes the necessary NO
INHERIT within the constraint definition.
Author: Nikhil Sontakke
Some tweaks by me
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/09ff76fcdb275769ac4d1a45a67416735613d04b
Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 5 +-
doc/src/sgml/ref/create_table.sgml | 14 ++++--
src/backend/catalog/heap.c | 35 ++++++++-------
src/backend/catalog/index.c | 2 +-
src/backend/catalog/pg_constraint.c | 4 +-
src/backend/commands/tablecmds.c | 62 +++++++++++++---------------
src/backend/commands/trigger.c | 2 +-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 1 +
src/backend/parser/gram.y | 18 +++++---
src/backend/utils/adt/ruleutils.c | 9 +++-
src/backend/utils/cache/relcache.c | 2 +-
src/bin/pg_dump/pg_dump.c | 39 +++++++-----------
src/bin/pg_dump/pg_dump.h | 1 -
src/bin/psql/describe.c | 20 +++------
src/include/access/tupdesc.h | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/heap.h | 6 +-
src/include/catalog/pg_constraint.h | 4 +-
src/include/nodes/parsenodes.h | 1 +
src/test/regress/expected/alter_table.out | 10 ++--
src/test/regress/expected/inherit.out | 14 +++---
src/test/regress/input/constraints.source | 28 ++++++++++++
src/test/regress/output/constraints.source | 33 +++++++++++++++
src/test/regress/sql/alter_table.sql | 6 +-
src/test/regress/sql/inherit.sql | 8 ++--
27 files changed, 197 insertions(+), 133 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-04-21 04:51:25 | pgsql: Use fuzzy not exact cost comparison for the final tie-breaker in |
Previous Message | Tom Lane | 2012-04-21 00:11:48 | pgsql: Adjust join_search_one_level's handling of clauseless joins. |