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

Commit 3caa56f

Browse files
committed
Emit 'this operator is deprecated' warnings for ':' and ';'.
1 parent 72b4086 commit 3caa56f

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/backend/parser/gram.y

+17-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.160 2000/03/20 00:24:37 inoue Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.161 2000/03/20 05:20:34 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -4179,9 +4179,15 @@ a_expr: c_expr
41794179
| '|' a_expr
41804180
{ $$ = makeA_Expr(OP, "|", NULL, $2); }
41814181
| ':' a_expr
4182-
{ $$ = makeA_Expr(OP, ":", NULL, $2); }
4182+
{ $$ = makeA_Expr(OP, ":", NULL, $2);
4183+
elog(NOTICE, "The ':' operator is deprecated. Use exp(x) instead."
4184+
"\n\tThis operator will be removed in a future release.");
4185+
}
41834186
| ';' a_expr
4184-
{ $$ = makeA_Expr(OP, ";", NULL, $2); }
4187+
{ $$ = makeA_Expr(OP, ";", NULL, $2);
4188+
elog(NOTICE, "The ';' operator is deprecated. Use ln(x) instead."
4189+
"\n\tThis operator will be removed in a future release.");
4190+
}
41854191
| a_expr '%'
41864192
{ $$ = makeA_Expr(OP, "%", $1, NULL); }
41874193
| a_expr '^'
@@ -4397,9 +4403,15 @@ b_expr: c_expr
43974403
| '|' b_expr
43984404
{ $$ = makeA_Expr(OP, "|", NULL, $2); }
43994405
| ':' b_expr
4400-
{ $$ = makeA_Expr(OP, ":", NULL, $2); }
4406+
{ $$ = makeA_Expr(OP, ":", NULL, $2);
4407+
elog(NOTICE, "The ':' operator is deprecated. Use exp(x) instead."
4408+
"\n\tThis operator will be removed in a future release.");
4409+
}
44014410
| ';' b_expr
4402-
{ $$ = makeA_Expr(OP, ";", NULL, $2); }
4411+
{ $$ = makeA_Expr(OP, ";", NULL, $2);
4412+
elog(NOTICE, "The ';' operator is deprecated. Use ln(x) instead."
4413+
"\n\tThis operator will be removed in a future release.");
4414+
}
44034415
| b_expr '%'
44044416
{ $$ = makeA_Expr(OP, "%", $1, NULL); }
44054417
| b_expr '^'

0 commit comments

Comments
 (0)