Re: Basic DOMAIN Support - Mailing list pgsql-patches

From Tom Lane
Subject Re: Basic DOMAIN Support
Date
Msg-id 5693.1015563911@sss.pgh.pa.us
Whole thread Raw
In response to Re: Basic DOMAIN Support  ("Rod Taylor" <rbt@zort.ca>)
List pgsql-patches
"Rod Taylor" <rbt@zort.ca> writes:
> find how to use it.  Just that I noticed a TODO item stating that
> everything should have one. I guess I don't understand -- among other
> things -- why DomainStmt needs to be copied?

If it's not copiable then it will fail when used in plpgsql, among
probably other problems.  In general there should be no parse
node types that don't have copyObject() and equal() support; and also
outfuncs.c support, for debugging dumps if nothing else.  We've been
relatively lax on insisting on readfuncs.c support --- that really only
matters for constructs that can appear in rules.

> MergeDomainAttributes pushes the domains configuration onto a table
> field during table creation where the field type is a domain.

Ah.  I had it backwards: thought it was pulling constraints into the
domain definition from elsewhere.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Small fix for _valueCopy()
Next
From: Neil Conway
Date:
Subject: ALTER TABLE OWNER: handle toast