postgresql/src/backend/utils
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
..
adt Improve similar_escape() in two different ways: 2009-10-10 03:50:15 +00:00
cache Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c. 2009-10-10 01:43:50 +00:00
error Add log_line_prefix placeholder %e to contain the current SQL state 2009-07-03 19:14:25 +00:00
fmgr Support use of function argument names to identify which actual arguments 2009-10-08 02:39:25 +00:00
hash Update copyright for 2009. 2009-01-01 17:24:05 +00:00
init Make it possibly to specify GUC params per user and per database. 2009-10-07 22:14:26 +00:00
mb Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
misc Fix a couple of issues in recent patch to print updates to postgresql.conf 2009-10-03 18:04:57 +00:00
mmgr Speed up AllocSetFreeIndex, which is a significant cost in palloc and pfree, 2009-07-21 19:53:12 +00:00
resowner 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
sort Extend EXPLAIN to support output in XML or JSON format. 2009-08-10 05:46:50 +00:00
time Fix snapshot management, take two. 2009-10-07 16:27:18 +00:00
.cvsignore Cleanup to ensure good state of derived files in tarballs. 2000-06-09 02:38:36 +00:00
Gen_dummy_probes.sed Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Gen_fmgrtab.pl Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Gen_fmgrtab.sh Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Makefile Add a few more DTrace probes to the backend. 2008-08-01 13:16:09 +00:00
probes.d Revert DTrace patch from Robert Lor 2009-04-02 20:59:10 +00:00