diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-05-27 00:13:09 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-05-27 00:13:09 +0000 |
| commit | 7b8a63c3e922b8730e98a20a2c30c5460ddf2306 (patch) | |
| tree | a66a78e79e9e8efb89622f5206461e469b54fd3c /src/include/catalog/pg_amproc.h | |
| parent | a3d9a2421ad3c16c22c82734a1d12be472bf9ba5 (diff) | |
| download | postgresql-7b8a63c3e922b8730e98a20a2c30c5460ddf2306.tar.gz | |
Alter the xxx_pattern_ops opclasses to use the regular equality operator of
the associated datatype as their equality member. This means that these
opclasses can now support plain equality comparisons along with LIKE tests,
thus avoiding the need for an extra index in some applications. This
optimization was not possible when the pattern opclasses were first introduced,
because we didn't insist that text equality meant bitwise equality; but we
do now, so there is no semantic difference between regular and pattern
equality operators.
I removed the name_pattern_ops opclass altogether, since it's really useless:
name's regular comparisons are just strcmp() and are unlikely to become
something different. Instead teach indxpath.c that btree name_ops can be
used for LIKE whether or not the locale is C. This might lead to a useful
speedup in LIKE queries on the system catalogs in non-C locales.
The ~=~ and ~<>~ operators are gone altogether. (It would have been nice to
keep them for backward compatibility's sake, but since the pg_amop structure
doesn't allow multiple equality operators per opclass, there's no way.)
A not-immediately-obvious incompatibility is that the sort order within
bpchar_pattern_ops indexes changes --- it had been identical to plain
strcmp, but is now trailing-blank-insensitive. This will impact
in-place upgrades, if those ever happen.
Per discussions a couple months ago.
Diffstat (limited to 'src/include/catalog/pg_amproc.h')
| -rw-r--r-- | src/include/catalog/pg_amproc.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index 36bd0f8409..5ca46600e3 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -22,7 +22,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_amproc.h,v 1.72 2008/05/16 16:31:01 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_amproc.h,v 1.73 2008/05/27 00:13:09 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -117,7 +117,6 @@ DATA(insert ( 2000 1266 1266 1 1358 )); DATA(insert ( 2002 1562 1562 1 1672 )); DATA(insert ( 2095 25 25 1 2166 )); DATA(insert ( 2097 1042 1042 1 2180 )); -DATA(insert ( 2098 19 19 1 2187 )); DATA(insert ( 2099 790 790 1 377 )); DATA(insert ( 2233 703 703 1 380 )); DATA(insert ( 2234 704 704 1 381 )); @@ -154,9 +153,8 @@ DATA(insert ( 2225 28 28 1 450 )); DATA(insert ( 2226 29 29 1 450 )); DATA(insert ( 2227 702 702 1 450 )); DATA(insert ( 2228 703 703 1 450 )); -DATA(insert ( 2229 25 25 1 456 )); -DATA(insert ( 2231 1042 1042 1 456 )); -DATA(insert ( 2232 19 19 1 455 )); +DATA(insert ( 2229 25 25 1 400 )); +DATA(insert ( 2231 1042 1042 1 1080 )); DATA(insert ( 2235 1033 1033 1 329 )); DATA(insert ( 2969 2950 2950 1 2963 )); DATA(insert ( 3523 3500 3500 1 3515 )); |
