27#include "utils/fmgroids.h"
413 errmsg(
"invalid preceding or following size in window function")));
448 errmsg(
"bigint out of range")));
471 errmsg(
"bigint out of range")));
485 errmsg(
"bigint out of range")));
499 errmsg(
"bigint out of range")));
514 errmsg(
"division by zero")));
530 errmsg(
"bigint out of range")));
554 errmsg(
"bigint out of range")));
572 errmsg(
"division by zero")));
636 errmsg(
"bigint out of range")));
704 errmsg(
"bigint out of range")));
710 errmsg(
"bigint out of range")));
727 errmsg(
"bigint out of range")));
741 errmsg(
"bigint out of range")));
790 if (
req->window_clause->orderClause ==
NIL)
810 req->monotonic = monotonic;
833 agg->agglevelsup != 0)
899 errmsg(
"bigint out of range")));
913 errmsg(
"bigint out of range")));
927 errmsg(
"bigint out of range")));
942 errmsg(
"division by zero")));
958 errmsg(
"bigint out of range")));
980 errmsg(
"bigint out of range")));
994 errmsg(
"bigint out of range")));
1008 errmsg(
"bigint out of range")));
1022 errmsg(
"division by zero")));
1041 errmsg(
"bigint out of range")));
1055 errmsg(
"bigint out of range")));
1069 errmsg(
"bigint out of range")));
1084 errmsg(
"division by zero")));
1100 errmsg(
"bigint out of range")));
1122 errmsg(
"bigint out of range")));
1136 errmsg(
"bigint out of range")));
1150 errmsg(
"bigint out of range")));
1164 errmsg(
"division by zero")));
1256 errmsg(
"integer out of range")));
1277 errmsg(
"smallint out of range")));
1312 errmsg(
"bigint out of range")));
1347 errmsg(
"bigint out of range")));
1360 errmsg(
"OID out of range")));
1411 errmsg(
"step size cannot equal zero")));
1429 fctx->finish = finish;
1443 result =
fctx->current;
1445 if ((
fctx->step > 0 &&
fctx->current <=
fctx->finish) ||
#define FLOAT4_FITS_IN_INT64(num)
#define Assert(condition)
#define FLOAT8_FITS_IN_INT64(num)
Node * estimate_expression_value(PlannerInfo *root, Node *node)
bool expr_is_nonnullable(PlannerInfo *root, Expr *expr, bool use_rel_info)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_FLOAT8(n)
#define PG_RETURN_FLOAT8(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_RETURN_INT64(x)
#define PG_GETARG_CSTRING(n)
#define PG_GETARG_INT64(n)
#define PG_RETURN_INT16(x)
#define PG_RETURN_OID8(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GETARG_BOOL(n)
#define PG_GETARG_FLOAT4(n)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_FLOAT4(x)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_INT16(n)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
#define SRF_RETURN_DONE(_funcctx)
static const FormData_pg_attribute a1
static const FormData_pg_attribute a2
Datum int8lcm(PG_FUNCTION_ARGS)
Datum int84div(PG_FUNCTION_ARGS)
Datum int8ge(PG_FUNCTION_ARGS)
Datum i8tooid(PG_FUNCTION_ARGS)
Datum int8dec_any(PG_FUNCTION_ARGS)
Datum in_range_int8_int8(PG_FUNCTION_ARGS)
Datum int8abs(PG_FUNCTION_ARGS)
Datum int48ge(PG_FUNCTION_ARGS)
Datum int82le(PG_FUNCTION_ARGS)
Datum int28lt(PG_FUNCTION_ARGS)
Datum int84pl(PG_FUNCTION_ARGS)
Datum int48pl(PG_FUNCTION_ARGS)
Datum int8out(PG_FUNCTION_ARGS)
Datum int82mi(PG_FUNCTION_ARGS)
Datum int84gt(PG_FUNCTION_ARGS)
Datum int28ne(PG_FUNCTION_ARGS)
Datum int8send(PG_FUNCTION_ARGS)
Datum int8ne(PG_FUNCTION_ARGS)
Datum int84(PG_FUNCTION_ARGS)
Datum int8mul(PG_FUNCTION_ARGS)
Datum int84ge(PG_FUNCTION_ARGS)
Datum int48lt(PG_FUNCTION_ARGS)
Datum int8gcd(PG_FUNCTION_ARGS)
Datum int8not(PG_FUNCTION_ARGS)
Datum int8le(PG_FUNCTION_ARGS)
Datum int8lt(PG_FUNCTION_ARGS)
Datum int48eq(PG_FUNCTION_ARGS)
Datum generate_series_step_int8(PG_FUNCTION_ARGS)
Datum generate_series_int8(PG_FUNCTION_ARGS)
Datum int8eq(PG_FUNCTION_ARGS)
Datum generate_series_int8_support(PG_FUNCTION_ARGS)
Datum int82div(PG_FUNCTION_ARGS)
Datum int48le(PG_FUNCTION_ARGS)
Datum int28gt(PG_FUNCTION_ARGS)
Datum i8tod(PG_FUNCTION_ARGS)
Datum int8inc_support(PG_FUNCTION_ARGS)
Datum int8in(PG_FUNCTION_ARGS)
Datum int8mod(PG_FUNCTION_ARGS)
Datum oidtoi8(PG_FUNCTION_ARGS)
Datum int28pl(PG_FUNCTION_ARGS)
Datum int84eq(PG_FUNCTION_ARGS)
Datum int28div(PG_FUNCTION_ARGS)
Datum int8pl(PG_FUNCTION_ARGS)
Datum int8larger(PG_FUNCTION_ARGS)
Datum int8xor(PG_FUNCTION_ARGS)
Datum int28(PG_FUNCTION_ARGS)
Datum int8gt(PG_FUNCTION_ARGS)
Datum int8div(PG_FUNCTION_ARGS)
Datum int48ne(PG_FUNCTION_ARGS)
Datum int82pl(PG_FUNCTION_ARGS)
Datum int48mul(PG_FUNCTION_ARGS)
Datum int48mi(PG_FUNCTION_ARGS)
Datum oidtooid8(PG_FUNCTION_ARGS)
Datum int8up(PG_FUNCTION_ARGS)
Datum int8smaller(PG_FUNCTION_ARGS)
Datum int28le(PG_FUNCTION_ARGS)
static int64 int8gcd_internal(int64 arg1, int64 arg2)
Datum int82lt(PG_FUNCTION_ARGS)
Datum int82gt(PG_FUNCTION_ARGS)
Datum int82mul(PG_FUNCTION_ARGS)
Datum dtoi8(PG_FUNCTION_ARGS)
Datum int82ge(PG_FUNCTION_ARGS)
Datum int48div(PG_FUNCTION_ARGS)
Datum int8inc_any(PG_FUNCTION_ARGS)
Datum int48gt(PG_FUNCTION_ARGS)
Datum int8or(PG_FUNCTION_ARGS)
Datum int48(PG_FUNCTION_ARGS)
Datum int8shr(PG_FUNCTION_ARGS)
Datum int8recv(PG_FUNCTION_ARGS)
Datum int84le(PG_FUNCTION_ARGS)
Datum int8dec(PG_FUNCTION_ARGS)
Datum int84mi(PG_FUNCTION_ARGS)
Datum int82ne(PG_FUNCTION_ARGS)
Datum int82(PG_FUNCTION_ARGS)
Datum int8inc_float8_float8(PG_FUNCTION_ARGS)
Datum int28ge(PG_FUNCTION_ARGS)
Datum int8shl(PG_FUNCTION_ARGS)
Datum i8tof(PG_FUNCTION_ARGS)
Datum int82eq(PG_FUNCTION_ARGS)
Datum int84ne(PG_FUNCTION_ARGS)
Datum int8mi(PG_FUNCTION_ARGS)
Datum ftoi8(PG_FUNCTION_ARGS)
Datum int8and(PG_FUNCTION_ARGS)
Datum int84mul(PG_FUNCTION_ARGS)
Datum int8um(PG_FUNCTION_ARGS)
Datum int28mi(PG_FUNCTION_ARGS)
Datum int84lt(PG_FUNCTION_ARGS)
Datum int28eq(PG_FUNCTION_ARGS)
Datum int28mul(PG_FUNCTION_ARGS)
Datum int8inc(PG_FUNCTION_ARGS)
static bool pg_mul_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_sub_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_add_s64_overflow(int64 a, int64 b, int64 *result)
static bool is_funcclause(const void *clause)
#define IsA(nodeptr, _type_)
int64 pg_strtoint64_safe(const char *s, Node *escontext)
int pg_lltoa(int64 value, char *a)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define FRAMEOPTION_START_UNBOUNDED_PRECEDING
#define FRAMEOPTION_END_UNBOUNDED_FOLLOWING
static int list_length(const List *l)
static char buf[DEFAULT_XLOG_SEG_SIZE]
@ MONOTONICFUNC_DECREASING
@ MONOTONICFUNC_INCREASING
static Datum Int64GetDatum(int64 X)
static int64 DatumGetInt64(Datum X)
struct StringInfoData * StringInfo
WindowClause * window_clause
static uint32 gcd(uint32 a, uint32 b)