postgresql/src/backend/commands
Tom Lane 2ffa740be9 Fix ruleutils to cope with conflicts from adding/dropping/renaming columns.
In commit 11e131854f, 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.)
2012-12-31 15:13:26 -05:00
..
Makefile Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
aggregatecmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
alter.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
analyze.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
async.c Fix NOTIFY to cope with I/O problems, such as out-of-disk-space. 2012-06-29 00:51:34 -04:00
cluster.c Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-28 21:26:01 -05:00
collationcmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
comment.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
constraint.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
conversioncmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
copy.c Fix compiler warning about uninitialized variable 2012-12-31 00:13:40 -05:00
createas.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
dbcommands.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
define.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
discard.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dropcmds.c Don't trash input list structure in does_not_exist_skipping(). 2012-11-08 11:34:32 -05:00
event_trigger.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
explain.c Fix ruleutils to cope with conflicts from adding/dropping/renaming columns. 2012-12-31 15:13:26 -05:00
extension.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
foreigncmds.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
functioncmds.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
indexcmds.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
lockcmds.c Repair comment mangled by a pgindent run long ago 2012-06-21 15:37:05 -04:00
opclasscmds.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
operatorcmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
portalcmds.c Revert patch for taking fewer snapshots. 2012-11-26 15:55:43 -05:00
prepare.c Revert patch for taking fewer snapshots. 2012-11-26 15:55:43 -05:00
proclang.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
schemacmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
seclabel.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
sequence.c Remove obsolete XLogRecPtr macros 2012-12-28 13:06:15 -03:00
tablecmds.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
tablespace.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
trigger.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00
tsearchcmds.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
typecmds.c Fix ruleutils to cope with conflicts from adding/dropping/renaming columns. 2012-12-31 15:13:26 -05:00
user.c Adjust more backend functions to return OID rather than void. 2012-12-29 07:55:37 -05:00
vacuum.c Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-28 21:26:01 -05:00
vacuumlazy.c Make some messages more consistent in style 2012-12-21 00:10:46 -05:00
variable.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
view.c Adjust many backend functions to return OID rather than void. 2012-12-23 18:37:58 -05:00