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
6d6b5828
Commit
6d6b5828
authored
Oct 20, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow aggregate functions in rule WHERE clauses. Per gripe from
Fritz Lehmann-Grube back in January.
parent
ea794574
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+5
-1
No files found.
src/backend/parser/analyze.c
View file @
6d6b5828
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.25
1 2002/10/14 22:14:35
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.25
2 2002/10/20 00:31:53
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1454,6 +1454,10 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
if
(
length
(
pstate
->
p_rtable
)
!=
2
)
/* naughty, naughty... */
elog
(
ERROR
,
"Rule WHERE condition may not contain references to other relations"
);
/* aggregates not allowed (but subselects are okay) */
if
(
contain_agg_clause
(
stmt
->
whereClause
))
elog
(
ERROR
,
"Rule WHERE condition may not contain aggregate functions"
);
/* save info about sublinks in where clause */
qry
->
hasSubLinks
=
pstate
->
p_hasSubLinks
;
...
...
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