Re: incorrect (incomplete) description for "alter domain" - Mailing list pgsql-docs

From Tom Lane
Subject Re: incorrect (incomplete) description for "alter domain"
Date
Msg-id 2596729.1722266261@sss.pgh.pa.us
Whole thread Raw
In response to Re: incorrect (incomplete) description for "alter domain"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: incorrect (incomplete) description for "alter domain"
Re: incorrect (incomplete) description for "alter domain"
List pgsql-docs
I wrote:
> I think the page is technically correct, but I'm inclined to duplicate
> this text from the CREATE DOMAIN page:

>     where domain_constraint is:
>     [ CONSTRAINT constraint_name ]
>     { NOT NULL | NULL | CHECK (expression) }

> rather than making readers go look that up.

Actually, there *is* a bug in the description, because experimentation
shows that CREATE DOMAIN accepts NULL in this syntax (as advertised)
but ALTER DOMAIN does not.  We could alternatively decide that that's
a code bug and make ALTER DOMAIN take it, but I don't think it's worth
any effort (and this behavior may actually have been intentional, too).
I think we should just add

    where domain_constraint is:

    [ CONSTRAINT constraint_name ]
    { NOT NULL | CHECK (expression) }

to the ALTER DOMAIN page, and then remove the claim that it's
identical to CREATE DOMAIN.

            regards, tom lane



pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: incorrect (incomplete) description for "alter domain"
Next
From: "David G. Johnston"
Date:
Subject: Re: incorrect (incomplete) description for "alter domain"