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

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD
Date
Msg-id 20070511201823.3387B9FBF22@postgresql.org
Whole thread Raw
List 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.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/doc/src/sgml/ref:
        alter_domain.sgml (r1.20 -> r1.20.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_domain.sgml.diff?r1=1.20&r2=1.20.2.1)
    pgsql/src/backend/commands:
        tablecmds.c (r1.206.2.2 -> r1.206.2.3)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.206.2.2&r2=1.206.2.3)
        typecmds.c (r1.97 -> r1.97.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/typecmds.c.diff?r1=1.97&r2=1.97.2.1)
    pgsql/src/include/commands:
        tablecmds.h (r1.31 -> r1.31.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/tablecmds.h.diff?r1=1.31&r2=1.31.2.1)
    pgsql/src/test/regress/expected:
        domain.out (r1.38.2.2 -> r1.38.2.3)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/domain.out.diff?r1=1.38.2.2&r2=1.38.2.3)
    pgsql/src/test/regress/sql:
        domain.sql (r1.21.2.2 -> r1.21.2.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/domain.sql.diff?r1=1.21.2.2&r2=1.21.2.3)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix my oversight in enabling domains-of-domains: ALTER DOMAIN ADD
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix the problem that creating a user-defined type named _foo,