Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfcabd07

Browse files
author
Thomas G. Lockhart
committed
Change precedence for boolean operators to match expected behavior.
Change NOTICE/NOTICE/NOTICE/WARN elog messages to a single message with a few newline/tab breaks embedded in the string. Much cleaner I hope.
1 parentcc19151 commitfcabd07

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎src/backend/parser/gram.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.81 1997/12/24 06:06:26 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.82 1998/01/01 05:44:53 thomas Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -306,10 +306,11 @@ Oidparam_type(int t); /* used in parse_expr.c */
306306
%leftAND
307307
%rightNOT
308308
%right'='
309+
%nonassoc'<' '>'
309310
%nonassocLIKE
310311
%nonassocBETWEEN
311312
%nonassocIN
312-
%nonassocOp
313+
%nonassocOp/* multi-character ops and user-defined operators */
313314
%nonassocNOTNULL
314315
%nonassocISNULL
315316
%nonassocIS
@@ -319,7 +320,6 @@ Oidparam_type(int t); /* used in parse_expr.c */
319320
/* Unary Operators */
320321
%right':'
321322
%left';'/* end of statement or natural log */
322-
%nonassoc'<' '>'
323323
%rightUMINUS
324324
%left'.'
325325
%left'[' ']'

‎src/backend/parser/parse_oper.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.3 1997/11/26 03:42:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.4 1998/01/01 05:44:54 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -587,11 +587,17 @@ op_error(char *op, Oid arg1, Oid arg2)
587587
elog(WARN,"right hand side of operator %s has an unknown type, probably a bad attribute name",op);
588588
}
589589

590+
#ifFALSE
590591
elog(NOTICE,"there is no operator %s for types %s and %s",
591592
op,typeTypeName(tp1),typeTypeName(tp2));
592593
elog(NOTICE,"You will either have to retype this query using an");
593594
elog(NOTICE,"explicit cast, or you will have to define the operator");
594595
elog(WARN,"%s for %s and %s using CREATE OPERATOR",
595596
op,typeTypeName(tp1),typeTypeName(tp2));
597+
#endif
598+
elog(WARN,"There is no operator '%s' for types '%s' and '%s'"
599+
"\n\tYou will either have to retype this query using an explicit cast,"
600+
"\n\tor you will have to define the operator using CREATE OPERATOR",
601+
op,typeTypeName(tp1),typeTypeName(tp2));
596602
}
597603

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp