OSDN Git Service

Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD CONSTRAINT
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2007 20:17:15 +0000 (20:17 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2007 20:17:15 +0000 (20:17 +0000)
commitd8326119c8885e938eff79e22fce6c1cb19379f4
tree7c482ccb7b0d0aec7551585347a422e495a67d4e
parent3b6afdd7f9d38c33f21e5211ccbbcd3514312372
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