postgresql/src/backend
Tom Lane 05d249717d Improve similar_escape() in two different ways:
* Stop escaping ? and {.  As of SQL:2008, SIMILAR TO is defined to have
POSIX-compatible interpretation of ? as well as {m,n} and related constructs,
so we should allow these things through to our regex engine.

* Escape ^ and $.  It appears that our regex engine will treat ^^ at the
beginning of the string the same as ^, and similarly for $$ at the end of
the string, which meant that SIMILAR TO was effectively ignoring ^ at the
start of the pattern and $ at the end.  Since these are not supposed to be
metacharacters, this is a bug.

The second part of this is arguably a back-patchable bug fix, but I'm
hesitant to do that because it might break applications that are expecting
something like "col SIMILAR TO '^foo$'" to work like a POSIX pattern.
Seems safer to only change it at a major version boundary.

Per discussion of an example from Doug Gorley.
2009-10-10 03:50:15 +00:00
..
access Remove very ancient tuple-counting infrastructure (IncrRetrieved() and 2009-10-08 22:34:57 +00:00
bootstrap Create an ALTER DEFAULT PRIVILEGES command, which allows users to adjust 2009-10-05 19:24:49 +00:00
catalog Support use of function argument names to identify which actual arguments 2009-10-08 02:39:25 +00:00
commands Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
executor Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
foreign Somebody seems to have thought they could get away without checking for 2009-06-11 16:14:18 +00:00
lib Assorted minor refactoring in EXPLAIN. 2009-07-24 21:08:42 +00:00
libpq Fix assorted memory leaks in pg_hba.conf parsing. Over a sufficiently 2009-10-03 20:04:39 +00:00
main Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nodes Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
optimizer Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
parser Support use of function argument names to identify which actual arguments 2009-10-08 02:39:25 +00:00
po Translation updates for 8.4 release. 2009-06-26 19:33:52 +00:00
port Reserve the shared memory region during backend startup on Windows, so 2009-07-24 20:12:42 +00:00
postmaster Fix an oversight in an 8.3-era patch: pgstat_initstats should allow stats 2009-10-02 22:49:50 +00:00
regex 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
rewrite Fix subquery pullup to wrap a PlaceHolderVar around the entire RowExpr 2009-09-02 17:52:24 +00:00
snowball Derived files that are shipped in the distribution used to be built in the 2009-08-28 20:26:19 +00:00
storage Change the autovacuum launcher to read pg_database directly, rather than 2009-08-31 19:41:00 +00:00
tcop Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
tsearch Remove duplicate variable initializations identified by clang static checker. 2009-08-30 16:53:31 +00:00
utils Improve similar_escape() in two different ways: 2009-10-10 03:50:15 +00:00
Makefile Put back "ifeq ($(PORTNAME), solaris)", this time with some documentation 2009-09-05 21:14:04 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00