pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid coercing a whole-row variable that is already coerced.
2+ messages / 2 participants
[nested] [flat]

* pgsql: Avoid coercing a whole-row variable that is already coerced.
@ 2017-10-12 21:16 Robert Haas <rhaas@postgresql.org>
  2017-10-12 21:42 ` Re: pgsql: Avoid coercing a whole-row variable that is already coerced. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Robert Haas @ 2017-10-12 21:16 UTC (permalink / raw)
  To: pgsql-committers

Avoid coercing a whole-row variable that is already coerced.

Marginal efficiency and beautification hack.  I'm not sure whether
this case ever arises currently, but the pending patch for update
tuple routing will cause it to arise.

Amit Khandekar

Discussion: http://postgr.es/m/CAJ3gD9cazfppe7-wwUbabPcQ4_0SubkiPFD1+0r5_DkVNWo5yg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1c497fa72df7593d8976653538da3d0ab033207f

Modified Files
--------------
src/backend/rewrite/rewriteManip.c | 53 ++++++++++++++++++++++++++++++--------
1 file changed, 42 insertions(+), 11 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Avoid coercing a whole-row variable that is already coerced.
  2017-10-12 21:16 pgsql: Avoid coercing a whole-row variable that is already coerced. Robert Haas <rhaas@postgresql.org>
@ 2017-10-12 21:42 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-10-12 21:42 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers

Robert Haas <rhaas@postgresql.org> writes:
> Avoid coercing a whole-row variable that is already coerced.

This logic seems very strange and more than likely buggy: the
added coerced_var flag feels like the sort of action at a distance
that is likely to have unforeseen side effects.

I'm not entirely sure what the issue is here, but if you're concerned
about not applying two ConvertRowtypeExprs in a row, why not have the
upper one just strip off the lower one?  We handle, eg, nested
RelabelTypes that way.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-10-12 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 21:16 pgsql: Avoid coercing a whole-row variable that is already coerced. Robert Haas <rhaas@postgresql.org>
2017-10-12 21:42 ` Tom Lane <tgl@sss.pgh.pa.us>

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