Skip to content

Commit 9ab6c30

Browse files
committed
Make expression locations for LIKE and SIMILAR TO constructs uniformly point
at the first keyword of the expression, rather than drawing a rather artificial distinction between the ESCAPE subclause and the rest. Per gripe from Gokulakannan Somasundaram and subsequent discusssion.
1 parent 9bedd12 commit 9ab6c30

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/backend/parser/gram.y

Lines changed: 8 additions & 8 deletions
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.686 2009/10/14 22:14:22 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.687 2009/11/04 23:15:08 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -8607,7 +8607,7 @@ a_expr: c_expr { $$ = $1; }
86078607
n->agg_distinct = FALSE;
86088608
n->func_variadic = FALSE;
86098609
n->over = NULL;
8610-
n->location = @4;
8610+
n->location = @2;
86118611
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", $1, (Node *) n, @2);
86128612
}
86138613
| a_expr NOT LIKE a_expr
@@ -8621,7 +8621,7 @@ a_expr: c_expr { $$ = $1; }
86218621
n->agg_distinct = FALSE;
86228622
n->func_variadic = FALSE;
86238623
n->over = NULL;
8624-
n->location = @5;
8624+
n->location = @2;
86258625
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", $1, (Node *) n, @2);
86268626
}
86278627
| a_expr ILIKE a_expr
@@ -8635,7 +8635,7 @@ a_expr: c_expr { $$ = $1; }
86358635
n->agg_distinct = FALSE;
86368636
n->func_variadic = FALSE;
86378637
n->over = NULL;
8638-
n->location = @4;
8638+
n->location = @2;
86398639
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", $1, (Node *) n, @2);
86408640
}
86418641
| a_expr NOT ILIKE a_expr
@@ -8649,7 +8649,7 @@ a_expr: c_expr { $$ = $1; }
86498649
n->agg_distinct = FALSE;
86508650
n->func_variadic = FALSE;
86518651
n->over = NULL;
8652-
n->location = @5;
8652+
n->location = @2;
86538653
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", $1, (Node *) n, @2);
86548654
}
86558655

@@ -8674,7 +8674,7 @@ a_expr: c_expr { $$ = $1; }
86748674
n->agg_distinct = FALSE;
86758675
n->func_variadic = FALSE;
86768676
n->over = NULL;
8677-
n->location = @5;
8677+
n->location = @2;
86788678
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "~", $1, (Node *) n, @2);
86798679
}
86808680
| a_expr NOT SIMILAR TO a_expr %prec SIMILAR
@@ -8686,7 +8686,7 @@ a_expr: c_expr { $$ = $1; }
86868686
n->agg_distinct = FALSE;
86878687
n->func_variadic = FALSE;
86888688
n->over = NULL;
8689-
n->location = @5;
8689+
n->location = @2;
86908690
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", $1, (Node *) n, @2);
86918691
}
86928692
| a_expr NOT SIMILAR TO a_expr ESCAPE a_expr
@@ -8698,7 +8698,7 @@ a_expr: c_expr { $$ = $1; }
86988698
n->agg_distinct = FALSE;
86998699
n->func_variadic = FALSE;
87008700
n->over = NULL;
8701-
n->location = @6;
8701+
n->location = @2;
87028702
$$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~", $1, (Node *) n, @2);
87038703
}
87048704

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy