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

pgsql: Allow CHECK constraints to be declared ONLY

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow CHECK constraints to be declared ONLY
Date: 2011-12-19 20:31:42
Message-ID: E1Rcjs6-0002MK-MT@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Allow CHECK constraints to be declared ONLY

This makes them enforceable only on the parent table, not on children
tables.  This is useful in various situations, per discussion involving
people bitten by the restrictive behavior introduced in 8.4.

Message-Id:
8762mp93iw(dot)fsf(at)comcast(dot)net
CAFaPBrSMMpubkGf4zcRL_YL-AERUbYF_-ZNNYfb3CVwwEqc9TQ(at)mail(dot)gmail(dot)com

Authors: Nikhil Sontakke, Alex Hunsaker
Reviewed by Robert Haas and myself

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac

Modified Files
--------------
doc/src/sgml/catalogs.sgml                |   10 ++++++
doc/src/sgml/ref/alter_table.sgml         |    8 +++++
src/backend/catalog/heap.c                |   28 +++++++++++-----
src/backend/catalog/index.c               |    3 +-
src/backend/catalog/pg_constraint.c       |    4 ++-
src/backend/commands/tablecmds.c          |   50 ++++++++++++++++++++---------
src/backend/commands/trigger.c            |    3 +-
src/backend/commands/typecmds.c           |    3 +-
src/backend/utils/cache/relcache.c        |    1 +
src/bin/pg_dump/pg_dump.c                 |   44 +++++++++++++++++---------
src/bin/pg_dump/pg_dump.h                 |    1 +
src/bin/psql/describe.c                   |   19 ++++++++---
src/include/access/tupdesc.h              |    1 +
src/include/catalog/heap.h                |    4 ++-
src/include/catalog/pg_constraint.h       |   25 +++++++++------
src/test/regress/expected/alter_table.out |   21 ++++++------
src/test/regress/expected/inherit.out     |   35 ++++++++++++++++++++
src/test/regress/sql/alter_table.sql      |   15 ++++-----
src/test/regress/sql/inherit.sql          |   14 ++++++++
19 files changed, 211 insertions(+), 78 deletions(-)

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2011-12-19 20:38:44
Subject: pgsql: Rename updateNodeLink to spgUpdateNodeLink.
Previous:From: Tom LaneDate: 2011-12-19 19:58:52
Subject: pgsql: Teach SP-GiST to do index-only scans.

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