|
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 534 of file windowfuncs.c.
References DatumGetInt32(), FunctionCallInfoBaseData::flinfo, get_fn_expr_arg_stable(), PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WinCheckAndInitializeNullTreatment(), 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(), rank_context::rank, 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 334 of file windowfuncs.c.
References Assert(), PG_RETURN_FLOAT8, PG_WINDOW_OBJECT, rank_context::rank, rank_up(), WinCheckAndInitializeNullTreatment(), WinGetCurrentPosition(), WinGetPartitionLocalMemory(), WinGetPartitionRowCount(), and WinRowsArePeers().
| Datum window_cume_dist_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 376 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 202 of file windowfuncs.c.
References PG_RETURN_INT64, PG_WINDOW_OBJECT, rank_context::rank, rank_up(), WinCheckAndInitializeNullTreatment(), and WinGetPartitionLocalMemory().
| Datum window_dense_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 223 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 656 of file windowfuncs.c.
References PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WinCheckAndInitializeNullTreatment(), WINDOW_SEEK_HEAD, and WinGetFuncArgInFrame().
| Datum window_lag | ( | PG_FUNCTION_ARGS | ) |
Definition at line 587 of file windowfuncs.c.
References leadlag_common().
| Datum window_lag_with_offset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 599 of file windowfuncs.c.
References leadlag_common().
| Datum window_lag_with_offset_and_default | ( | PG_FUNCTION_ARGS | ) |
Definition at line 610 of file windowfuncs.c.
References leadlag_common().
| Datum window_last_value | ( | PG_FUNCTION_ARGS | ) |
Definition at line 678 of file windowfuncs.c.
References PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WinCheckAndInitializeNullTreatment(), WINDOW_SEEK_TAIL, and WinGetFuncArgInFrame().
| Datum window_lead | ( | PG_FUNCTION_ARGS | ) |
Definition at line 622 of file windowfuncs.c.
References leadlag_common().
| Datum window_lead_with_offset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 634 of file windowfuncs.c.
References leadlag_common().
| Datum window_lead_with_offset_and_default | ( | PG_FUNCTION_ARGS | ) |
Definition at line 645 of file windowfuncs.c.
References leadlag_common().
| Datum window_nth_value | ( | PG_FUNCTION_ARGS | ) |
Definition at line 700 of file windowfuncs.c.
References DatumGetInt32(), ereport, errcode(), errmsg(), ERROR, get_fn_expr_arg_stable(), PG_RETURN_DATUM, PG_RETURN_NULL, PG_WINDOW_OBJECT, WinCheckAndInitializeNullTreatment(), WINDOW_SEEK_HEAD, WinGetFuncArgCurrent(), and WinGetFuncArgInFrame().
| Datum window_ntile | ( | PG_FUNCTION_ARGS | ) |
Definition at line 416 of file windowfuncs.c.
References ntile_context::boundary, DatumGetInt32(), ereport, errcode(), errmsg(), ERROR, ntile_context::ntile, PG_RETURN_INT32, PG_RETURN_NULL, PG_WINDOW_OBJECT, ntile_context::remainder, ntile_context::rows_per_bucket, WinCheckAndInitializeNullTreatment(), WinGetFuncArgCurrent(), WinGetPartitionLocalMemory(), and WinGetPartitionRowCount().
| Datum window_ntile_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 489 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 264 of file windowfuncs.c.
References Assert(), PG_RETURN_FLOAT8, PG_WINDOW_OBJECT, rank_context::rank, rank_up(), WinCheckAndInitializeNullTreatment(), WinGetCurrentPosition(), WinGetPartitionLocalMemory(), and WinGetPartitionRowCount().
| Datum window_percent_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 292 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 139 of file windowfuncs.c.
References PG_RETURN_INT64, PG_WINDOW_OBJECT, rank_context::rank, rank_up(), WinCheckAndInitializeNullTreatment(), WinGetCurrentPosition(), and WinGetPartitionLocalMemory().
| Datum window_rank_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 160 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, WinCheckAndInitializeNullTreatment(), WinGetCurrentPosition(), and WinSetMarkPosition().
| Datum window_row_number_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 99 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.