Re: Coerce to Domain - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Coerce to Domain
Date
Msg-id 15008.1040166954@sss.pgh.pa.us
Whole thread Raw
In response to Coerce to Domain  (Rod Taylor <rbt@rbt.ca>)
Responses Re: Coerce to Domain
List pgsql-hackers
Rod Taylor <rbt@rbt.ca> writes:
> 3. On initial pass, CoerceToDomain will have a 'raw' expression tree
> (simple arg of data to coerce).  After passing through
> ExecCoerceTypeConstraints a 'cooked' expression tree will contain the
> constraint tests.

Uh ... why?  The cooked tree should be stored in pg_constraint, no?
What's the point of redoing the parse analysis phase?

BTW, this should be a lot easier to do cleanly (ie, without memory
leaks) now that there's a notion of expression state trees.  You can
attach the information loaded from pg_constraint to the expression state
node for the CoerceToDomain node (being careful to copy it into
estate->es_query_cxt).  Maybe that was already apparent to you ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: disabled, deferred triggers
Next
From: Tom Lane
Date:
Subject: Re: Update on replication