postgresql/src
Tom Lane e31193d495 Fix yet another corner case in dumping rules/views with USING clauses.
ruleutils.c tries to cope with additions/deletions/renamings of columns in
tables referenced by views, by means of adding machine-generated aliases to
the printed form of a view when needed to preserve the original semantics.
A recent blog post by Marko Tiikkaja pointed out a case I'd missed though:
if one input of a join with USING is itself a join, there is nothing to
stop the user from adding a column of the same name as the USING column to
whichever side of the sub-join didn't provide the USING column.  And then
there'll be an error when the view is re-parsed, since now the sub-join
exposes two columns matching the USING specification.  We were catching a
lot of related cases, but not this one, so add some logic to cope with it.

Back-patch to 9.3, which is the first release that makes any serious
attempt to cope with such cases (cf commit 2ffa740be and follow-ons).
2014-05-01 20:22:39 -04:00
..
backend Fix yet another corner case in dumping rules/views with USING clauses. 2014-05-01 20:22:39 -04:00
bin Add missing SYSTEMQUOTEs 2014-04-30 10:35:46 +03:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
include Fix failure to detoast fields in composite elements of structured types. 2014-05-01 15:19:10 -04:00
interfaces Fix unused-variable warning on Windows. 2014-04-17 16:12:32 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:32 -05:00
pl Fix failure to detoast fields in composite elements of structured types. 2014-05-01 15:19:10 -04:00
port Fix assorted issues in client host name lookup. 2014-04-02 17:11:27 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Fix yet another corner case in dumping rules/views with USING clauses. 2014-05-01 20:22:39 -04:00
timezone Update time zone data files to tzdata release 2014a. 2014-03-15 13:36:24 -04:00
tools Attempt to get plpython regression tests working again for MSVC builds. 2014-04-16 13:43:32 -04:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Revert "Backpatch pgxs vpath build and installation fixes." 2013-10-07 22:32:04 -04:00
Makefile.shlib fix whitespace 2014-02-01 16:30:22 -05:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00