Unix Technical Forum

pgsql: Change the rules for inherited CHECK constraints to be

This is a discussion on pgsql: Change the rules for inherited CHECK constraints to be within the pgsql Committers forums, part of the PostgreSQL category; --> Log Message: ----------- Change the rules for inherited CHECK constraints to be essentially the same as those for inherited ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Committers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2008, 02:05 PM
Tom Lane
 
Posts: n/a
Default pgsql: Change the rules for inherited CHECK constraints to be

Log Message:
-----------
Change the rules for inherited CHECK constraints to be essentially the same
as those for inherited columns; that is, it's no longer allowed for a child
table to not have a check constraint matching one that exists on a parent.
This satisfies the principle of least surprise (rows selected from the parent
will always appear to meet its check constraints) and eliminates some
longstanding bogosity in pg_dump, which formerly had to guess about whether
check constraints were really inherited or not.

The implementation involves adding conislocal and coninhcount columns to
pg_constraint (paralleling attislocal and attinhcount in pg_attribute)
and refactoring various ALTER TABLE actions to be more like those for
columns.

Alex Hunsaker, Nikhil Sontakke, Tom Lane

Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.165 -> r2.166)
(http://anoncvs.postgresql.org/cvsweb...2.165&r2=2.166)
ddl.sgml (r1.81 -> r1.82)
(http://anoncvs.postgresql.org/cvsweb...1=1.81&r2=1.82)
pgsql/doc/src/sgml/ref:
alter_table.sgml (r1.98 -> r1.99)
(http://anoncvs.postgresql.org/cvsweb...1=1.98&r2=1.99)
create_table.sgml (r1.109 -> r1.110)
(http://anoncvs.postgresql.org/cvsweb...1.109&r2=1.110)
pgsql/src/backend/access/common:
tupdesc.c (r1.122 -> r1.123)
(http://anoncvs.postgresql.org/cvsweb...1.122&r2=1.123)
pgsql/src/backend/bootstrap:
bootparse.y (r1.91 -> r1.92)
(http://anoncvs.postgresql.org/cvsweb...1=1.91&r2=1.92)
pgsql/src/backend/catalog:
heap.c (r1.332 -> r1.333)
(http://anoncvs.postgresql.org/cvsweb...1.332&r2=1.333)
index.c (r1.296 -> r1.297)
(http://anoncvs.postgresql.org/cvsweb...1.296&r2=1.297)
pg_constraint.c (r1.40 -> r1.41)
(http://anoncvs.postgresql.org/cvsweb...1=1.40&r2=1.41)
toasting.c (r1.9 -> r1.10)
(http://anoncvs.postgresql.org/cvsweb...r1=1.9&r2=1.10)
pgsql/src/backend/commands:
cluster.c (r1.173 -> r1.174)
(http://anoncvs.postgresql.org/cvsweb...1.173&r2=1.174)
tablecmds.c (r1.251 -> r1.252)
(http://anoncvs.postgresql.org/cvsweb...1.251&r2=1.252)
typecmds.c (r1.117 -> r1.118)
(http://anoncvs.postgresql.org/cvsweb...1.117&r2=1.118)
pgsql/src/backend/executor:
execMain.c (r1.306 -> r1.307)
(http://anoncvs.postgresql.org/cvsweb...1.306&r2=1.307)
pgsql/src/bin/pg_dump:
common.c (r1.103 -> r1.104)
(http://anoncvs.postgresql.org/cvsweb...1.103&r2=1.104)
pg_dump.c (r1.489 -> r1.490)
(http://anoncvs.postgresql.org/cvsweb...1.489&r2=1.490)
pg_dump.h (r1.139 -> r1.140)
(http://anoncvs.postgresql.org/cvsweb...1.139&r2=1.140)
pgsql/src/include/catalog:
catversion.h (r1.457 -> r1.458)
(http://anoncvs.postgresql.org/cvsweb...1.457&r2=1.458)
heap.h (r1.87 -> r1.88)
(http://anoncvs.postgresql.org/cvsweb...1=1.87&r2=1.88)
pg_constraint.h (r1.28 -> r1.29)
(http://anoncvs.postgresql.org/cvsweb...1=1.28&r2=1.29)
pgsql/src/include/nodes:
parsenodes.h (r1.364 -> r1.365)
(http://anoncvs.postgresql.org/cvsweb...1.364&r2=1.365)
pgsql/src/test/regress/expected:
alter_table.out (r1.105 -> r1.106)
(http://anoncvs.postgresql.org/cvsweb...1.105&r2=1.106)
inherit.out (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb...1=1.23&r2=1.24)
pgsql/src/test/regress/sql:
alter_table.sql (r1.57 -> r1.58)
(http://anoncvs.postgresql.org/cvsweb...1=1.57&r2=1.58)
inherit.sql (r1.11 -> r1.12)
(http://anoncvs.postgresql.org/cvsweb...1=1.11&r2=1.12)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com