pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: Bug in ExecModifyTable function and trigger issues for foreign tables
Date: Wed, 19 Jul 2017 10:36:51 -0400
Message-ID: <8065.1500475011@sss.pgh.pa.us> (raw)
In-Reply-To: <280720c5-7aad-1136-6be3-654208c8f714@lab.ntt.co.jp>
References: <20170514150525.0346ba72@postgrespro.ru>
	<CAFiTN-vx1pYKbtkFdX9srL+dghCJdZ9-DgRb57oDs5GuCDCD2Q@mail.gmail.com>
	<20170515121638.0c076bcc@wp.localdomain>
	<CAFjFpRfQ1pkCjNQFVOP_BPJfc7OR3596nqVVFBgAiDEZqB4Azg@mail.gmail.com>
	<20170515165455.545dd3d6@wp.localdomain>
	<CAFjFpRcQudmKYU4PJRN1-wp5K4aksupSoVpcRVAzES_49T=Vng@mail.gmail.com>
	<20170516150516.1b616230@wp.localdomain>
	<CAFjFpReeA3G3-U-FsR79zx_xFBVZc73hhWcH4OVWMb+ZFViRQg@mail.gmail.com>
	<dbf4b9ff-b0be-2396-7c79-d5763ae8a034@lab.ntt.co.jp>
	<f62d1797-2817-0f2e-eb7b-38da40504c8d@lab.ntt.co.jp>
	<a31f779e-9cb8-1ea5-71a6-bca6adbfa6a4@lab.ntt.co.jp>
	<20170615180548.5e142ddc@wp.localdomain>
	<0bc9c28b-96ca-c875-871e-16af6f53ecd9@lab.ntt.co.jp>
	<CAFjFpReUW9JhuyEq5mhi2Hrt3KpjHHP8LnWBZQhrHek3c0KGVQ@mail.gmail.com>
	<428f1672-df54-de01-91da-b57365193bf4@lab.ntt.co.jp>
	<d0a12e42-e20a-b561-76ed-7fa48d4b520a@lab.ntt.co.jp>
	<6c651916-8fde-f9c9-b199-080df1bf2867@lab.ntt.co.jp>
	<280720c5-7aad-1136-6be3-654208c8f714@lab.ntt.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (43+ messages)  latest in thread

Message-ID: <8065.1500475011@sss.pgh.pa.us>
Permalink:  ../8065.1500475011@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8065.1500475011@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fujita.etsuro@lab.ntt.co.jp, ashutosh.bapat@enterprisedb.com, i.kurbangaliev@postgrespro.ru, dilipbalaut@gmail.com, robertmhaas@gmail.com
  Subject: Re: Bug in ExecModifyTable function and trigger issues for foreign tables
  In-Reply-To: <8065.1500475011@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox