postgresql/src/backend
Tom Lane 0950d67ee5 Tweak parse location assignment for CURRENT_DATE and related constructs.
All these constructs generate parse trees consisting of a Const and
a run-time type coercion (perhaps a FuncExpr or a CoerceViaIO).  Modify
the raw parse output so that we end up with the original token's location
attached to the type coercion node while the Const has location -1;
before, it was the other way around.  This makes no difference in terms
of what exprLocation() will say about the parse tree as a whole, so it
should not have any user-visible impact.  The point of changing it is that
we do not want contrib/pg_stat_statements to treat these constructs as
replaceable constants.  It will do the right thing if the Const has
location -1 rather than a valid location.

This is a pretty ugly hack, but then this code is ugly already; we should
someday replace this translation with special-purpose parse node(s) that
would allow ruleutils.c to reconstruct the original query text.

(See also commit 5d3fcc4c2e, which also
hacked location assignment rules for the benefit of pg_stat_statements.)

Back-patch to 9.2 where pg_stat_statements grew the ability to recognize
replaceable constants.

Kyotaro Horiguchi
2014-01-21 16:34:31 -05:00
..
access Fix multiple bugs in index page locking during hot-standby WAL replay. 2014-01-14 17:34:51 -05:00
bootstrap Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
catalog Accept pg_upgraded tuples during multixact freezing 2014-01-10 18:03:18 -03:00
commands Allow SET TABLESPACE to database default 2014-01-18 18:49:08 -05:00
executor Fix "cannot accept a set" error when only some arms of a CASE return a set. 2014-01-08 20:18:10 -05:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib Reset the binary heap in MergeAppend rescans. 2013-08-30 19:15:32 -04:00
libpq Clear retry flags properly in replacement OpenSSL sock_write function. 2013-12-05 12:48:31 -05:00
main Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
nodes Fix incorrect loop counts in tidbitmap.c. 2013-11-15 18:34:21 -05:00
optimizer Fix inherited UPDATE/DELETE with UNION ALL subqueries. 2013-12-14 17:33:56 -05:00
parser Tweak parse location assignment for CURRENT_DATE and related constructs. 2014-01-21 16:34:31 -05:00
po Translation updates 2013-12-02 00:09:43 -05:00
port Message style improvements 2013-08-07 22:53:50 -04:00
postmaster Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
regex Fix regex match failures for backrefs combined with non-greedy quantifiers. 2013-07-18 21:22:43 -04:00
replication Fix Hot Standby feedback sending when streaming busily. 2014-01-16 23:14:57 +02:00
rewrite Fix breakage of MV column name list usage. 2013-11-04 14:45:18 -06:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Fix multiple bugs in index page locking during hot-standby WAL replay. 2014-01-14 17:34:51 -05:00
tcop Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
tsearch pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
utils Fix inadvertent semantics change in last patch to plug memory leaks. 2014-01-21 11:49:13 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-21 06:20:05 -04:00