Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD CONSTRAINT
authorTom Lane <[email protected]>
Fri, 11 May 2007 20:18:21 +0000 (20:18 +0000)
committerTom Lane <[email protected]>
Fri, 11 May 2007 20:18:21 +0000 (20:18 +0000)
commit4aa3563d023c610a3faa1c1f98f8eb5932b38d4c
tree78db9a936b5b829a005c2bae3c8729387260a4ce
parenteb065e90f4d4fff52318076cdc2e6f24e4d313c9
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.
doc/src/sgml/ref/alter_domain.sgml
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/include/commands/tablecmds.h
src/test/regress/expected/domain.out
src/test/regress/sql/domain.sql