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

Commit3a7bd59

Browse files
committed
Re-allow SRFs and window functions within sub-selects within aggregates.
check_agg_arguments_walker threw an error upon seeing a SRF or windowfunction, but that is too aggressive: if the function is within asub-select then it's perfectly fine. I broke the SRF case in commit0436f6b by copying the logic for window functions ... but that wasbroken too, and had been since commiteaccfde.Repair both cases in HEAD, and the window function case back to 9.3.9.2 gets this right.
1 parentdf31a9f commit3a7bd59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/parser/parse_agg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ check_agg_arguments_walker(Node *node,
700700
/* Continue and descend into subtree */
701701
}
702702
/* We can throw error on sight for a window function */
703-
if (IsA(node,WindowFunc))
703+
if (IsA(node,WindowFunc)&&context->sublevels_up==0)
704704
ereport(ERROR,
705705
(errcode(ERRCODE_GROUPING_ERROR),
706706
errmsg("aggregate function calls cannot contain window function calls"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp