aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-10 20:58:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-10 20:58:26 +0000
commit4886dc92e0a45e50600187e7ff8e289e14ded5ca (patch)
treee0c4670df57efa1f24618268e25c73c4d45e3185 /src/backend/utils/adt/arrayfuncs.c
parent42831729f7c9a77a2b4b57b1adbe9432f7c7f384 (diff)
downloadpostgresql-4886dc92e0a45e50600187e7ff8e289e14ded5ca.tar.gz
postgresql-4886dc92e0a45e50600187e7ff8e289e14ded5ca.zip
Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled
by the planning process. This prevents the "failed to locate grouping columns" error recently reported by Dickson Guedes. That happens because planning replaces SubLinks by SubPlans in the subquery's targetlist, and exprTypmod() is smarter about the former than the latter, causing the apparent type of the subquery's output columns to change. This seems to be a deficiency we should fix in exprTypmod(), but that will be a much more invasive patch with possible side-effects elsewhere, so I'll do that only in HEAD. Back-patch to 8.3. Arguably the lack of a copying step is broken/dangerous all the way back, but in the absence of known problems I'll refrain from making the older branches pay the extra cost. (The reason this particular symptom didn't appear before is that exprTypmod() wasn't smart about SubLinks either, until 8.3.)
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
0 files changed, 0 insertions, 0 deletions