aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-04-14 17:05:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-14 17:05:34 +0000
commit9b5c8d45f62bd3d243a40cc84deb93893f2f5122 (patch)
tree2d75607f7bdb96cfa1d73a3a36a4b3328118ff08 /src/backend/parser
parent10be77c173211a75718f50fe6061862f6a0cb4a2 (diff)
downloadpostgresql-9b5c8d45f62bd3d243a40cc84deb93893f2f5122.tar.gz
postgresql-9b5c8d45f62bd3d243a40cc84deb93893f2f5122.zip
Push index operator lossiness determination down to GIST/GIN opclass
"consistent" functions, and remove pg_amop.opreqcheck, as per recent discussion. The main immediate benefit of this is that we no longer need 8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery searches on GIN indexes. In future it should be possible to optimize some other queries better than is done now, by detecting at runtime whether the index match is exact or not. Tom Lane, after an idea of Heikki's, and with some help from Teodor.
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 21fff239c70..e17842231d9 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.611 2008/03/28 00:21:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.612 2008/04/14 17:05:33 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -3107,7 +3107,6 @@ opclass_item:
n->name = $3;
n->args = NIL;
n->number = $2;
- n->recheck = $4;
$$ = (Node *) n;
}
| OPERATOR Iconst any_operator '(' oper_argtypes ')' opt_recheck
@@ -3117,7 +3116,6 @@ opclass_item:
n->name = $3;
n->args = $5;
n->number = $2;
- n->recheck = $7;
$$ = (Node *) n;
}
| FUNCTION Iconst func_name func_args
@@ -3156,7 +3154,14 @@ opt_opfamily: FAMILY any_name { $$ = $2; }
| /*EMPTY*/ { $$ = NIL; }
;
-opt_recheck: RECHECK { $$ = TRUE; }
+opt_recheck: RECHECK
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("RECHECK is no longer supported"),
+ errhint("Update your data type.")));
+ $$ = TRUE;
+ }
| /*EMPTY*/ { $$ = FALSE; }
;