From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: In planner.c, avoid assuming that all PathTargets have sortgroup |
Date: | 2016-06-13 16:59:33 |
Message-ID: | E1bCVD3-0004Vc-KE@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
In planner.c, avoid assuming that all PathTargets have sortgrouprefs.
The struct definition for PathTarget specifies that a NULL sortgrouprefs
pointer means no sortgroupref labels. While it's likely that there
should always be at least one labeled column in the places that were
unconditionally fetching through the pointer, it seems wiser to adhere to
the data structure specification and test first. Add a macro to make this
convenient. Per experimentation with running the regression tests with a
very small parallelization threshold --- the crash I observed may well
represent a bug elsewhere, but still this coding was not very robust.
Report: <20756(dot)1465834072(at)sss(dot)pgh(dot)pa(dot)us>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/89d53515e53ea080029894939118365b647489b3
Modified Files
--------------
src/backend/optimizer/plan/planner.c | 10 +++++-----
src/include/nodes/relation.h | 4 ++++
2 files changed, 9 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-13 17:53:41 | pgsql: Fix multiple minor infelicities in aclchk.c error reports. |
Previous Message | Tom Lane | 2016-06-13 15:50:44 | pgsql: Remove extraneous leading whitespace in Windows build script. |