Commit fcabd075 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

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.
parent cc19151e
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.81 1997/12/24 06:06:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.82 1998/01/01 05:44:53 thomas Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -306,10 +306,11 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -306,10 +306,11 @@ Oid param_type(int t); /* used in parse_expr.c */
%left AND %left AND
%right NOT %right NOT
%right '=' %right '='
%nonassoc '<' '>'
%nonassoc LIKE %nonassoc LIKE
%nonassoc BETWEEN %nonassoc BETWEEN
%nonassoc IN %nonassoc IN
%nonassoc Op %nonassoc Op /* multi-character ops and user-defined operators */
%nonassoc NOTNULL %nonassoc NOTNULL
%nonassoc ISNULL %nonassoc ISNULL
%nonassoc IS %nonassoc IS
...@@ -319,7 +320,6 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -319,7 +320,6 @@ Oid param_type(int t); /* used in parse_expr.c */
/* Unary Operators */ /* Unary Operators */
%right ':' %right ':'
%left ';' /* end of statement or natural log */ %left ';' /* end of statement or natural log */
%nonassoc '<' '>'
%right UMINUS %right UMINUS
%left '.' %left '.'
%left '[' ']' %left '[' ']'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.3 1997/11/26 03:42:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.4 1998/01/01 05:44:54 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -587,11 +587,17 @@ op_error(char *op, Oid arg1, Oid arg2) ...@@ -587,11 +587,17 @@ op_error(char *op, Oid arg1, Oid arg2)
elog(WARN, "right hand side of operator %s has an unknown type, probably a bad attribute name", op); elog(WARN, "right hand side of operator %s has an unknown type, probably a bad attribute name", op);
} }
#if FALSE
elog(NOTICE, "there is no operator %s for types %s and %s", elog(NOTICE, "there is no operator %s for types %s and %s",
op, typeTypeName(tp1), typeTypeName(tp2)); op, typeTypeName(tp1), typeTypeName(tp2));
elog(NOTICE, "You will either have to retype this query using an"); elog(NOTICE, "You will either have to retype this query using an");
elog(NOTICE, "explicit cast, or you will have to define the operator"); elog(NOTICE, "explicit cast, or you will have to define the operator");
elog(WARN, "%s for %s and %s using CREATE OPERATOR", elog(WARN, "%s for %s and %s using CREATE OPERATOR",
op, typeTypeName(tp1), typeTypeName(tp2)); op, typeTypeName(tp1), typeTypeName(tp2));
#endif
elog(WARN, "There is no operator '%s' for types '%s' and '%s'"
"\n\tYou will either have to retype this query using an explicit cast,"
"\n\tor you will have to define the operator using CREATE OPERATOR",
op, typeTypeName(tp1), typeTypeName(tp2));
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment