summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-12-31 15:13:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-12-31 15:13:26 -0500
commit2ffa740be9d96a3743ecb7e42391c53d0760c65a (patch)
treea84495c924796e77581669083ce1559a8b743dc7 /src/backend/access/gist/gistxlog.c
parent7eb559a86d773e0105ae5823e0c776c3af3c3fe2 (diff)
downloadpostgresql-2ffa740be9d96a3743ecb7e42391c53d0760c65a.tar.gz
Fix ruleutils to cope with conflicts from adding/dropping/renaming columns.
In commit 11e131854f8231a21613f834c40fe9d046926387, we improved the rule/view dumping code so that it would produce valid query representations even if some of the tables involved in a query had been renamed since the query was parsed. This patch extends that idea to fix problems that occur when individual columns are renamed, or added or dropped. As before, the core of the fix is to assign unique new aliases when a name conflict has been created. This is complicated by the JOIN USING feature, which requires the same column alias to be used in both input relations, but we can handle that with a sufficiently complex approach to assigning aliases. A fortiori, this patch takes care of situations where the query didn't have unique column names to begin with, such as in a recent complaint from Bryan Nuse. (Because of expansion of "SELECT *", re-parsing a dumped query can require column name uniqueness even though the original text did not.)
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions