]> granicus.if.org Git - postgresql/commit
Recast "ONLY" column CHECK constraints as NO INHERIT
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 21 Apr 2012 02:46:20 +0000 (23:46 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 21 Apr 2012 02:56:57 +0000 (23:56 -0300)
commit09ff76fcdb275769ac4d1a45a67416735613d04b
tree15d86c29de778477258b9d43128d8ed23ced6479
parent1f0363001166ef6a43619846e44cfb9dbe7335ed
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
27 files changed:
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_table.sgml
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/pg_constraint.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/backend/utils/adt/ruleutils.c
src/backend/utils/cache/relcache.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/psql/describe.c
src/include/access/tupdesc.h
src/include/catalog/catversion.h
src/include/catalog/heap.h
src/include/catalog/pg_constraint.h
src/include/nodes/parsenodes.h
src/test/regress/expected/alter_table.out
src/test/regress/expected/inherit.out
src/test/regress/input/constraints.source
src/test/regress/output/constraints.source
src/test/regress/sql/alter_table.sql
src/test/regress/sql/inherit.sql