postgresql/src
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
..
backend Improve similar_escape() in two different ways: 2009-10-10 03:50:15 +00:00
bin Use pg_get_triggerdef in pg_dump 2009-10-09 21:02:56 +00:00
include Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
interfaces Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory leak in decimal handling. 2009-10-01 18:03:54 +00:00
makefiles Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
pl Allow MOVE FORWARD n, MOVE BACKWARD n, MOVE FORWARD ALL, MOVE BACKWARD ALL 2009-09-29 20:05:29 +00:00
port Don't error out if recycling or removing an old WAL segment fails at the end 2009-09-13 18:32:08 +00:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Support use of function argument names to identify which actual arguments 2009-10-08 02:39:25 +00:00
timezone Fix a couple of issues in recent patch to print updates to postgresql.conf 2009-10-03 18:04:57 +00:00
tools Support "samehost" and "samenet" specifications in pg_hba.conf, 2009-10-01 01:58:58 +00:00
tutorial 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00: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 Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
Makefile.global.in Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
Makefile.shlib Derived files that are shipped in the distribution used to be built in the 2009-08-28 20:26:19 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
nls-global.mk Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00