PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "nodes/parsenodes.h"
#include "nodes/supportnodes.h"
#include "utils/fmgrprotos.h"
#include "windowapi.h"
Go to the source code of this file.
Data Structures | |
struct | rank_context |
struct | ntile_context |
Typedefs | |
typedef struct rank_context | rank_context |
typedef struct rank_context rank_context |
|
static |
Definition at line 528 of file windowfuncs.c.
References DatumGetInt32(), FunctionCallInfoBaseData::flinfo, get_fn_expr_arg_stable(), PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WINDOW_SEEK_CURRENT, WinGetFuncArgCurrent(), and WinGetFuncArgInPartition().
Referenced by window_lag(), window_lag_with_offset(), window_lag_with_offset_and_default(), window_lead(), window_lead_with_offset(), and window_lead_with_offset_and_default().
|
static |
Definition at line 49 of file windowfuncs.c.
References Assert, context, WinGetCurrentPosition(), WinGetPartitionLocalMemory(), WinRowsArePeers(), and WinSetMarkPosition().
Referenced by window_cume_dist(), window_dense_rank(), window_percent_rank(), and window_rank().
Datum window_cume_dist | ( | PG_FUNCTION_ARGS | ) |
Definition at line 330 of file windowfuncs.c.
References Assert, context, PG_RETURN_FLOAT8, PG_WINDOW_OBJECT, rank_up(), WinGetCurrentPosition(), WinGetPartitionLocalMemory(), WinGetPartitionRowCount(), and WinRowsArePeers().
Datum window_cume_dist_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 371 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum window_dense_rank | ( | PG_FUNCTION_ARGS | ) |
Definition at line 200 of file windowfuncs.c.
References context, PG_RETURN_INT64, PG_WINDOW_OBJECT, rank_up(), and WinGetPartitionLocalMemory().
Datum window_dense_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 220 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum window_first_value | ( | PG_FUNCTION_ARGS | ) |
Definition at line 649 of file windowfuncs.c.
References PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WINDOW_SEEK_HEAD, and WinGetFuncArgInFrame().
Datum window_lag | ( | PG_FUNCTION_ARGS | ) |
Definition at line 580 of file windowfuncs.c.
References leadlag_common().
Datum window_lag_with_offset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 592 of file windowfuncs.c.
References leadlag_common().
Datum window_lag_with_offset_and_default | ( | PG_FUNCTION_ARGS | ) |
Definition at line 603 of file windowfuncs.c.
References leadlag_common().
Datum window_last_value | ( | PG_FUNCTION_ARGS | ) |
Definition at line 670 of file windowfuncs.c.
References PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WINDOW_SEEK_TAIL, and WinGetFuncArgInFrame().
Datum window_lead | ( | PG_FUNCTION_ARGS | ) |
Definition at line 615 of file windowfuncs.c.
References leadlag_common().
Datum window_lead_with_offset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 627 of file windowfuncs.c.
References leadlag_common().
Datum window_lead_with_offset_and_default | ( | PG_FUNCTION_ARGS | ) |
Definition at line 638 of file windowfuncs.c.
References leadlag_common().
Datum window_nth_value | ( | PG_FUNCTION_ARGS | ) |
Definition at line 691 of file windowfuncs.c.
References DatumGetInt32(), ereport, errcode(), errmsg(), ERROR, get_fn_expr_arg_stable(), PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WINDOW_SEEK_HEAD, WinGetFuncArgCurrent(), and WinGetFuncArgInFrame().
Datum window_ntile | ( | PG_FUNCTION_ARGS | ) |
Definition at line 411 of file windowfuncs.c.
References context, DatumGetInt32(), ereport, errcode(), errmsg(), ERROR, PG_RETURN_INT32, PG_RETURN_NULL, PG_WINDOW_OBJECT, WinGetFuncArgCurrent(), WinGetPartitionLocalMemory(), and WinGetPartitionRowCount().
Datum window_ntile_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 483 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum window_percent_rank | ( | PG_FUNCTION_ARGS | ) |
Definition at line 261 of file windowfuncs.c.
References Assert, context, PG_RETURN_FLOAT8, PG_WINDOW_OBJECT, rank_up(), WinGetCurrentPosition(), WinGetPartitionLocalMemory(), and WinGetPartitionRowCount().
Datum window_percent_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 288 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum window_rank | ( | PG_FUNCTION_ARGS | ) |
Definition at line 138 of file windowfuncs.c.
References context, PG_RETURN_INT64, PG_WINDOW_OBJECT, rank_up(), WinGetCurrentPosition(), and WinGetPartitionLocalMemory().
Datum window_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 158 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum window_row_number | ( | PG_FUNCTION_ARGS | ) |
Definition at line 84 of file windowfuncs.c.
References PG_RETURN_INT64, PG_WINDOW_OBJECT, WinGetCurrentPosition(), and WinSetMarkPosition().
Datum window_row_number_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 98 of file windowfuncs.c.
References FRAMEOPTION_END_CURRENT_ROW, FRAMEOPTION_NONDEFAULT, FRAMEOPTION_ROWS, FRAMEOPTION_START_UNBOUNDED_PRECEDING, SupportRequestOptimizeWindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_INCREASING, PG_GETARG_POINTER, and PG_RETURN_POINTER.