aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-06-12 19:42:39 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-06-12 19:42:39 -0400
commitbf612fd3a4d8ff4953f400deccc3c8d1e411e935 (patch)
tree43a20aade2a763b72e4ffb17318fa3537136b056 /contrib/postgres_fdw/postgres_fdw.c
parentf7e99de95654b124330b06e0c406d56db5922794 (diff)
downloadpostgresql-bf612fd3a4d8ff4953f400deccc3c8d1e411e935.tar.gz
postgresql-bf612fd3a4d8ff4953f400deccc3c8d1e411e935.zip
Fix incorrect printing of queries with duplicated join names.
Given a query in which multiple JOIN nodes used the same alias (which'd necessarily be in different sub-SELECTs), ruleutils.c would assign the JOIN nodes distinct aliases for clarity ... but then it forgot to print the modified aliases when dumping the JOIN nodes themselves. This results in a dump/reload hazard for views, because the emitted query is flat-out incorrect: Vars will be printed with table names that have no referent. This has been wrong for a long time, so back-patch to all supported branches. Philip Dubé Discussion: https://postgr.es/m/CY4PR2101MB080246F2955FF58A6ED1FEAC98140@CY4PR2101MB0802.namprd21.prod.outlook.com
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions