Rod Taylor <pg@rbt.ca> writes:
>> CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
>> nextval('doc.seq_doc_id'::text)
>> CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;
> It comes out right for me in 7.4.2.
AFAICT the relevant fix was well before 7.4 release:
2003-10-04 14:22 tgl
* src/: backend/utils/adt/ruleutils.c,backend/utils/cache/lsyscache.c, include/utils/lsyscache.h:
Fixpg_get_constraintdef()to ensure CHECK constraints are always shownwith required outer parentheses. Breakage seems
tobe leftoverfrom domain-constraint patches. This could be smarter aboutsuppressing extra parens, but at this stage of
therelease cycle Iwant certainty not cuteness.
regards, tom lane