pgsql: Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD

Lists: pgsql-committers
From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD
Date: 2007-05-11 20:17:16
Message-ID: 20070511201716.D40AD9FB6AE@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Log Message:
-----------
Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD CONSTRAINT
needs to check the new constraint against columns of derived domains too.

Also, make it error out if the domain to be modified is used within any
composite-type columns. Eventually we should support that case, but it seems
a bit painful, and not suitable for a back-patch. For the moment just let the
user know we can't do it.

Backpatch to 8.2, which is the only released version that allows nested
domains. Possibly the other part should be back-patched further.

Modified Files:
--------------
pgsql/doc/src/sgml/ref:
alter_domain.sgml (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_domain.sgml.diff?r1=1.21&r2=1.22)
pgsql/src/backend/commands:
tablecmds.c (r1.220 -> r1.221)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.220&r2=1.221)
typecmds.c (r1.102 -> r1.103)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/typecmds.c.diff?r1=1.102&r2=1.103)
pgsql/src/include/commands:
tablecmds.h (r1.32 -> r1.33)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/tablecmds.h.diff?r1=1.32&r2=1.33)
pgsql/src/test/regress/expected:
domain.out (r1.40 -> r1.41)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/domain.out.diff?r1=1.40&r2=1.41)
pgsql/src/test/regress/sql:
domain.sql (r1.23 -> r1.24)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/domain.sql.diff?r1=1.23&r2=1.24)