From: Tom Lane Date: Mon, 20 Mar 2000 05:20:34 +0000 (+0000) Subject: Emit 'this operator is deprecated' warnings for ':' and ';'. X-Git-Tag: REL7_0~378 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3caa56fe5e5751b3ccbaa0831b482758c9bf4abd;p=thirdparty%2Fpostgresql.git Emit 'this operator is deprecated' warnings for ':' and ';'. --- diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index fcd89f675f1..a1172d404db 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.160 2000/03/20 00:24:37 inoue Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.161 2000/03/20 05:20:34 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -4179,9 +4179,15 @@ a_expr: c_expr | '|' a_expr { $$ = makeA_Expr(OP, "|", NULL, $2); } | ':' a_expr - { $$ = makeA_Expr(OP, ":", NULL, $2); } + { $$ = makeA_Expr(OP, ":", NULL, $2); + elog(NOTICE, "The ':' operator is deprecated. Use exp(x) instead." + "\n\tThis operator will be removed in a future release."); + } | ';' a_expr - { $$ = makeA_Expr(OP, ";", NULL, $2); } + { $$ = makeA_Expr(OP, ";", NULL, $2); + elog(NOTICE, "The ';' operator is deprecated. Use ln(x) instead." + "\n\tThis operator will be removed in a future release."); + } | a_expr '%' { $$ = makeA_Expr(OP, "%", $1, NULL); } | a_expr '^' @@ -4397,9 +4403,15 @@ b_expr: c_expr | '|' b_expr { $$ = makeA_Expr(OP, "|", NULL, $2); } | ':' b_expr - { $$ = makeA_Expr(OP, ":", NULL, $2); } + { $$ = makeA_Expr(OP, ":", NULL, $2); + elog(NOTICE, "The ':' operator is deprecated. Use exp(x) instead." + "\n\tThis operator will be removed in a future release."); + } | ';' b_expr - { $$ = makeA_Expr(OP, ";", NULL, $2); } + { $$ = makeA_Expr(OP, ";", NULL, $2); + elog(NOTICE, "The ';' operator is deprecated. Use ln(x) instead." + "\n\tThis operator will be removed in a future release."); + } | b_expr '%' { $$ = makeA_Expr(OP, "%", $1, NULL); } | b_expr '^'