Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ae3c075

Browse files
committed
Add comment about why BETWEEN uses operator strings and not opclasses,
with URL pointing to email discussion.
1 parent 445ce15 commit ae3c075

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/parser/gram.y

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.651 2009/01/01 17:23:45 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.652 2009/01/07 22:54:45 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -8361,6 +8361,11 @@ a_expr: c_expr { $$ = $1; }
83618361
{
83628362
$$ = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", $1, (Node *) $6, @2);
83638363
}
8364+
/*
8365+
* Ideally we would not use hard-wired operators below but instead use
8366+
* opclasses. However, mixed data types and other issues make this
8367+
* difficult: http://archives.postgresql.org/pgsql-hackers/2008-08/msg01142.php
8368+
*/
83648369
| a_expr BETWEEN opt_asymmetric b_expr AND b_expr %prec BETWEEN
83658370
{
83668371
$$ = (Node *) makeA_Expr(AEXPR_AND, NIL,

0 commit comments

Comments
 (0)