Skip site navigation (1) Skip section navigation (2)

Re: Command Triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Command Triggers
Date: 2011-12-04 16:34:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Andres Freund <andres(at)anarazel(dot)de> writes:
> I have two questions now:

> First, does anybody think it would be worth getting rid of the duplication 
> from OpenIntoRel (formerly from execMain.c) in regard to DefineRelation()?

That's probably reasonable to do, since as you say it would remove the
opportunity for bugs-of-omission in the CTAS table creation step.
OTOH, if you find yourself having to make any significant changes to
DefineRelation, then maybe not.

> Secondly, I am currently wondering whether it would be a good idea to use the 
> ModifyTable infrastructure for doing the insertion instead an own DestReceiver 
> infrastructure thats only used for CTAS.

I think this is probably a bad idea; it will complicate matters and buy
little.  There's not a lot of stuff needed for the actual data insertion
step, since we know the table can't have any defaults, constraints,
triggers, etc as yet.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2011-12-04 16:41:30
Subject: Re: Moving tablespaces
Previous:From: Magnus HaganderDate: 2011-12-04 16:22:33
Subject: Re: Moving tablespaces

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group