Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables
Date
Msg-id 8065.1500475011@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Bug in ExecModifyTable function and trigger issues forforeign tables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: [HACKERS] Bug in ExecModifyTable function and trigger issues forforeign tables
List pgsql-hackers
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> writes:
> * Modified rewrite_targetlist(), which is a new function added to 
> preptlist.c, so that we do const-simplification to junk TLEs that 
> AddForeignUpdateTargets() added, as that API allows the FDW to add junk 
> TLEs containing non-Var expressions to the query's targetlist.

This does not seem like a good idea to me.  eval_const_expressions is not
a cheap thing, and for most use-cases those cycles will be wasted, and it
has never been the responsibility of preprocess_targetlist to do this sort
of thing.

Please put the responsibility of doing const-expression simplification
in these cases somewhere closer to where the problem is being created.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] [WIP] Zipfian distribution in pgbench
Next
From: Brian Faherty
Date:
Subject: [HACKERS] Using non-sequential timelines in order to help with possible collisions