mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Fix recent accidental omission in pg_proc.dat
ed1a88dda
added support functions for the ntile(), percent_rank() and cume_dist() window functions but neglected to actually add these support functions to the pg_proc entry for the corresponding window function. Also, take this opportunity to add these window functions to one of the regression tests added ined1a88dda
to give the support functions a little bit of exercise. If I'd done that in the first place then the omission would have been more obvious. Bump the catversion, again.
This commit is contained in:
parent
c6f21b2ac2
commit
b5aff92557
@ -57,6 +57,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 202212232
|
#define CATALOG_VERSION_NO 202212241
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10204,20 +10204,22 @@
|
|||||||
proname => 'window_dense_rank_support', prorettype => 'internal',
|
proname => 'window_dense_rank_support', prorettype => 'internal',
|
||||||
proargtypes => 'internal', prosrc => 'window_dense_rank_support' },
|
proargtypes => 'internal', prosrc => 'window_dense_rank_support' },
|
||||||
{ oid => '3103', descr => 'fractional rank within partition',
|
{ oid => '3103', descr => 'fractional rank within partition',
|
||||||
proname => 'percent_rank', prokind => 'w', proisstrict => 'f',
|
proname => 'percent_rank', prosupport => 'window_percent_rank_support',
|
||||||
prorettype => 'float8', proargtypes => '', prosrc => 'window_percent_rank' },
|
prokind => 'w', proisstrict => 'f', prorettype => 'float8',
|
||||||
|
proargtypes => '', prosrc => 'window_percent_rank' },
|
||||||
{ oid => '9773', descr => 'planner support for percent_rank',
|
{ oid => '9773', descr => 'planner support for percent_rank',
|
||||||
proname => 'window_percent_rank_support', prorettype => 'internal',
|
proname => 'window_percent_rank_support', prorettype => 'internal',
|
||||||
proargtypes => 'internal', prosrc => 'window_percent_rank_support' },
|
proargtypes => 'internal', prosrc => 'window_percent_rank_support' },
|
||||||
{ oid => '3104', descr => 'fractional row number within partition',
|
{ oid => '3104', descr => 'fractional row number within partition',
|
||||||
proname => 'cume_dist', prokind => 'w', proisstrict => 'f',
|
proname => 'cume_dist', prosupport => 'window_cume_dist_support',
|
||||||
prorettype => 'float8', proargtypes => '', prosrc => 'window_cume_dist' },
|
prokind => 'w', proisstrict => 'f', prorettype => 'float8',
|
||||||
|
proargtypes => '', prosrc => 'window_cume_dist' },
|
||||||
{ oid => '9774', descr => 'planner support for cume_dist',
|
{ oid => '9774', descr => 'planner support for cume_dist',
|
||||||
proname => 'window_cume_dist_support', prorettype => 'internal',
|
proname => 'window_cume_dist_support', prorettype => 'internal',
|
||||||
proargtypes => 'internal', prosrc => 'window_cume_dist_support' },
|
proargtypes => 'internal', prosrc => 'window_cume_dist_support' },
|
||||||
{ oid => '3105', descr => 'split rows into N groups',
|
{ oid => '3105', descr => 'split rows into N groups',
|
||||||
proname => 'ntile', prokind => 'w', prorettype => 'int4',
|
proname => 'ntile', prosupport => 'window_ntile_support', prokind => 'w',
|
||||||
proargtypes => 'int4', prosrc => 'window_ntile' },
|
prorettype => 'int4', proargtypes => 'int4', prosrc => 'window_ntile' },
|
||||||
{ oid => '9775', descr => 'planner support for ntile',
|
{ oid => '9775', descr => 'planner support for ntile',
|
||||||
proname => 'window_ntile_support', prorettype => 'internal',
|
proname => 'window_ntile_support', prorettype => 'internal',
|
||||||
proargtypes => 'internal', prosrc => 'window_ntile_support' },
|
proargtypes => 'internal', prosrc => 'window_ntile_support' },
|
||||||
|
@ -3326,7 +3326,13 @@ SELECT
|
|||||||
rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
||||||
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) rnk,
|
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) rnk,
|
||||||
dense_rank() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
dense_rank() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
CURRENT ROW AND CURRENT ROW) drnk
|
CURRENT ROW AND CURRENT ROW) drnk,
|
||||||
|
ntile(10) OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) nt,
|
||||||
|
percent_rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) pr,
|
||||||
|
cume_dist() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) cd
|
||||||
FROM empsalary;
|
FROM empsalary;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
@ -987,7 +987,13 @@ SELECT
|
|||||||
rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
||||||
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) rnk,
|
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) rnk,
|
||||||
dense_rank() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
dense_rank() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
CURRENT ROW AND CURRENT ROW) drnk
|
CURRENT ROW AND CURRENT ROW) drnk,
|
||||||
|
ntile(10) OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) nt,
|
||||||
|
percent_rank() OVER (PARTITION BY depname ORDER BY enroll_date ROWS BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) pr,
|
||||||
|
cume_dist() OVER (PARTITION BY depname ORDER BY enroll_date RANGE BETWEEN
|
||||||
|
CURRENT ROW AND UNBOUNDED FOLLOWING) cd
|
||||||
FROM empsalary;
|
FROM empsalary;
|
||||||
|
|
||||||
-- Ensure WindowFuncs which cannot support their WindowClause's frameOptions
|
-- Ensure WindowFuncs which cannot support their WindowClause's frameOptions
|
||||||
|
Loading…
Reference in New Issue
Block a user