pgsql: Make simpler-simple-expressions code cope with a Gather plan.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make simpler-simple-expressions code cope with a Gather plan.
Date: 2017-08-15 20:50:08
Message-ID: E1dhimu-0008Hd-Ot@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make simpler-simple-expressions code cope with a Gather plan.

Commit 00418c612 expected that the plan generated for a simple-expression
query would always be a plain Result node. However, if force_parallel_mode
is on, the planner might stick a Gather atop that. Cope by looking through
the Gather. For safety, assert that the Gather's tlist is trivial.

Per buildfarm.

Discussion: https://postgr.es/m/23425.1502822098@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b73f1b5c29e0ace5a281bc13ce09dea30e1b66de

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 61 +++++++++++++++++++++++++++++++++-----------
1 file changed, 46 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2017-08-15 21:14:37 pgsql: Simplify autovacuum work-item implementation
Previous Message Peter Eisentraut 2017-08-15 20:23:31 pgsql: Fix logical replication protocol comparison logic