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
a35deb54
Commit
a35deb54
authored
Oct 29, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give a useful error message if a RangeVar is encountered in an expression.
Per example from Ian Barwick, 28-Oct-03.
parent
abec4cbf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/clauses.c
+21
-1
No files found.
src/backend/optimizer/util/clauses.c
View file @
a35deb54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.15
3 2003/08/17 23:43:26
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.15
4 2003/10/29 18:10:15
tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -2412,6 +2412,16 @@ expression_tree_walker(Node *node,
return
true
;
}
break
;
case
T_RangeVar
:
/*
* Give a useful complaint if someone uses a bare relation name
* in an expression (see comments in transformColumnRef()).
*/
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"relation reference
\"
%s
\"
cannot be used in an expression"
,
((
RangeVar
*
)
node
)
->
relname
)));
break
;
default:
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
nodeTag
(
node
));
...
...
@@ -2879,6 +2889,16 @@ expression_tree_mutator(Node *node,
return
(
Node
*
)
newnode
;
}
break
;
case
T_RangeVar
:
/*
* Give a useful complaint if someone uses a bare relation name
* in an expression (see comments in transformColumnRef()).
*/
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"relation reference
\"
%s
\"
cannot be used in an expression"
,
((
RangeVar
*
)
node
)
->
relname
)));
break
;
default:
elog
(
ERROR
,
"unrecognized node type: %d"
,
(
int
)
nodeTag
(
node
));
...
...
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