Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
98f5975c
Commit
98f5975c
authored
Dec 23, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up some elog error messages.
parent
7c682b46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
src/backend/parser/parse_expr.c
src/backend/parser/parse_expr.c
+14
-18
No files found.
src/backend/parser/parse_expr.c
View file @
98f5975c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.
3 1997/11/26 03:42:41 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.
4 1997/12/23 19:36:20 thomas
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -124,8 +124,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -124,8 +124,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
toid
=
param_type
(
paramno
);
toid
=
param_type
(
paramno
);
if
(
!
OidIsValid
(
toid
))
if
(
!
OidIsValid
(
toid
))
{
{
elog
(
WARN
,
"Parameter '$%d' is out of range"
,
elog
(
WARN
,
"Parameter '$%d' is out of range"
,
paramno
);
paramno
);
}
}
param
=
makeNode
(
Param
);
param
=
makeNode
(
Param
);
param
->
paramkind
=
PARAM_NUM
;
param
->
paramkind
=
PARAM_NUM
;
...
@@ -176,13 +175,13 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -176,13 +175,13 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
if
(
exprType
(
lexpr
)
!=
BOOLOID
)
if
(
exprType
(
lexpr
)
!=
BOOLOID
)
elog
(
WARN
,
elog
(
WARN
,
"left-hand side of AND is type '%s', not bool"
,
"left-hand side of AND is type '%s', not bool"
,
typeidTypeName
(
exprType
(
lexpr
)));
typeidTypeName
(
exprType
(
lexpr
)));
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
elog
(
WARN
,
elog
(
WARN
,
"right-hand side of AND is type '%s', not bool"
,
"right-hand side of AND is type '%s', not bool"
,
typeidTypeName
(
exprType
(
rexpr
)));
typeidTypeName
(
exprType
(
rexpr
)));
expr
->
typeOid
=
BOOLOID
;
expr
->
typeOid
=
BOOLOID
;
expr
->
opType
=
AND_EXPR
;
expr
->
opType
=
AND_EXPR
;
expr
->
args
=
makeList
(
lexpr
,
rexpr
,
-
1
);
expr
->
args
=
makeList
(
lexpr
,
rexpr
,
-
1
);
...
@@ -196,12 +195,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -196,12 +195,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
if
(
exprType
(
lexpr
)
!=
BOOLOID
)
if
(
exprType
(
lexpr
)
!=
BOOLOID
)
elog
(
WARN
,
elog
(
WARN
,
"left-hand side of OR is type '%s', not bool"
,
"left-hand side of OR is type '%s', not bool"
,
typeidTypeName
(
exprType
(
lexpr
)));
typeidTypeName
(
exprType
(
lexpr
)));
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
elog
(
WARN
,
elog
(
WARN
,
"right-hand side of OR is type '%s', not bool"
,
"right-hand side of OR is type '%s', not bool"
,
typeidTypeName
(
exprType
(
rexpr
)));
typeidTypeName
(
exprType
(
rexpr
)));
expr
->
typeOid
=
BOOLOID
;
expr
->
typeOid
=
BOOLOID
;
expr
->
opType
=
OR_EXPR
;
expr
->
opType
=
OR_EXPR
;
...
@@ -215,8 +212,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -215,8 +212,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
Node
*
rexpr
=
transformExpr
(
pstate
,
a
->
rexpr
,
precedence
);
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
if
(
exprType
(
rexpr
)
!=
BOOLOID
)
elog
(
WARN
,
elog
(
WARN
,
"argument to NOT is type '%s', not bool"
,
"argument to NOT is type '%s', not bool"
,
typeidTypeName
(
exprType
(
rexpr
)));
typeidTypeName
(
exprType
(
rexpr
)));
expr
->
typeOid
=
BOOLOID
;
expr
->
typeOid
=
BOOLOID
;
expr
->
opType
=
NOT_EXPR
;
expr
->
opType
=
NOT_EXPR
;
...
@@ -251,7 +247,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -251,7 +247,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
}
}
default:
default:
/* should not reach here */
/* should not reach here */
elog
(
WARN
,
"transformExpr: does not know how to transform
%d
\n
"
,
elog
(
WARN
,
"transformExpr: does not know how to transform
node %d
"
,
nodeTag
(
expr
));
nodeTag
(
expr
));
break
;
break
;
}
}
...
@@ -423,7 +419,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
...
@@ -423,7 +419,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
break
;
break
;
default:
default:
elog
(
WARN
,
elog
(
WARN
,
"parser_typecast: cannot cast this expression to type
\"
%s
\"
"
,
"parser_typecast: cannot cast this expression to type
'%s'
"
,
typename
->
name
);
typename
->
name
);
}
}
...
@@ -608,7 +604,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
...
@@ -608,7 +604,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
const_string
=
(
char
*
)
textout
((
struct
varlena
*
)
const_string
);
const_string
=
(
char
*
)
textout
((
struct
varlena
*
)
const_string
);
break
;
break
;
default:
default:
elog
(
WARN
,
"unknown type %u
"
,
exprType
);
elog
(
WARN
,
"unknown type %u"
,
exprType
);
}
}
if
(
!
exprType
)
if
(
!
exprType
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment