postgresql/src/backend
Tom Lane 670a6c7a22 Fix grammar for subscripting or field selection from a sub-SELECT result.
Such cases should work, but the grammar failed to accept them because of
our ancient precedence hacks to convince bison that extra parentheses
around a sub-SELECT in an expression are unambiguous.  (Formally, they
*are* ambiguous, but we don't especially care whether they're treated as
part of the sub-SELECT or part of the expression.  Bison cares, though.)
Fix by adding a redundant-looking production for this case.

This is a fine example of why fixing shift/reduce conflicts via
precedence declarations is more dangerous than it looks: you can easily
cause the parser to reject cases that should work.

This has been wrong since commit 3db4056e22
or maybe before, and apparently some people have been working around it
by inserting no-op casts.  That method introduces a dump/reload hazard,
as illustrated in bug #7838 from Jan Mate.  Hence, back-patch to all
active branches.
2013-01-30 14:17:48 -05:00
..
access Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
bootstrap Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
catalog REASSIGN OWNED: handle shared objects, too 2013-01-28 18:45:50 -03:00
commands Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
executor Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
foreign Update copyrights for 2013 2013-01-01 17:15:01 -05:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Update copyrights for 2013 2013-01-01 17:15:01 -05:00
main Update copyrights for 2013 2013-01-01 17:15:01 -05:00
nodes Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
optimizer Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
parser Fix grammar for subscripting or field selection from a sub-SELECT result. 2013-01-30 14:17:48 -05:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Also fix rotation of csvlog on Windows. 2013-01-24 11:41:30 +02:00
regex Update copyrights for 2013 2013-01-01 17:15:01 -05:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
tcop Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
nls.mk Split out XLog reading as an independent facility 2013-01-16 16:12:53 -03:00