45#define Int2VectorSize(n) (offsetof(int2vector, values) + (n) * sizeof(int16))
77 char *result = (
char *)
palloc(7);
144 Node *escontext = fcinfo->context;
174 errmsg(
"invalid input syntax for type %s: \"%s\"",
186 errmsg(
"invalid input syntax for type %s: \"%s\"",
217 for (num = 0; num <
nnums; num++)
264 errmsg(
"invalid int2vector data")));
301 char *result = (
char *)
palloc(12);
355 errmsg(
"smallint out of range")));
635 errmsg(
"invalid preceding or following size in window function")));
682 errmsg(
"invalid preceding or following size in window function")));
717 errmsg(
"invalid preceding or following size in window function")));
778 errmsg(
"integer out of range")));
800 errmsg(
"integer out of range")));
814 errmsg(
"integer out of range")));
828 errmsg(
"integer out of range")));
843 errmsg(
"division by zero")));
859 errmsg(
"integer out of range")));
880 errmsg(
"integer out of range")));
893 errmsg(
"smallint out of range")));
915 errmsg(
"smallint out of range")));
929 errmsg(
"smallint out of range")));
943 errmsg(
"smallint out of range")));
959 errmsg(
"division by zero")));
975 errmsg(
"smallint out of range")));
997 errmsg(
"integer out of range")));
1011 errmsg(
"integer out of range")));
1025 errmsg(
"integer out of range")));
1039 errmsg(
"division by zero")));
1058 errmsg(
"integer out of range")));
1072 errmsg(
"integer out of range")));
1086 errmsg(
"integer out of range")));
1101 errmsg(
"division by zero")));
1117 errmsg(
"integer out of range")));
1139 errmsg(
"division by zero")));
1167 errmsg(
"division by zero")));
1199 errmsg(
"integer out of range")));
1213 errmsg(
"smallint out of range")));
1263 errmsg(
"integer out of range")));
1331 errmsg(
"integer out of range")));
1337 errmsg(
"integer out of range")));
1529 errmsg(
"step size cannot equal zero")));
1547 fctx->finish = finish;
1561 result =
fctx->current;
1563 if ((
fctx->step > 0 &&
fctx->current <=
fctx->finish) ||
Datum array_recv(PG_FUNCTION_ARGS)
Datum array_send(PG_FUNCTION_ARGS)
#define Assert(condition)
Node * estimate_expression_value(PlannerInfo *root, Node *node)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_POINTER(n)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_DATUM(n)
#define LOCAL_FCINFO(name, nargs)
#define PG_GETARG_CSTRING(n)
#define PG_GETARG_INT64(n)
#define PG_RETURN_INT16(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GETARG_BOOL(n)
#define DirectFunctionCall5(func, arg1, arg2, arg3, arg4, arg5)
#define PG_RETURN_POINTER(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 int4div(PG_FUNCTION_ARGS)
Datum int4shl(PG_FUNCTION_ARGS)
Datum int2vectorrecv(PG_FUNCTION_ARGS)
Datum int2not(PG_FUNCTION_ARGS)
Datum int4pl(PG_FUNCTION_ARGS)
Datum int2xor(PG_FUNCTION_ARGS)
Datum generate_series_int4(PG_FUNCTION_ARGS)
Datum int4recv(PG_FUNCTION_ARGS)
Datum int4um(PG_FUNCTION_ARGS)
Datum int4gt(PG_FUNCTION_ARGS)
Datum int24eq(PG_FUNCTION_ARGS)
Datum int2lt(PG_FUNCTION_ARGS)
Datum int24mi(PG_FUNCTION_ARGS)
Datum int2out(PG_FUNCTION_ARGS)
Datum int2eq(PG_FUNCTION_ARGS)
Datum int42eq(PG_FUNCTION_ARGS)
Datum int2ge(PG_FUNCTION_ARGS)
Datum int2up(PG_FUNCTION_ARGS)
Datum int4gcd(PG_FUNCTION_ARGS)
Datum int42ge(PG_FUNCTION_ARGS)
Datum int42mul(PG_FUNCTION_ARGS)
Datum int24gt(PG_FUNCTION_ARGS)
Datum int2le(PG_FUNCTION_ARGS)
Datum int2abs(PG_FUNCTION_ARGS)
#define Int2VectorSize(n)
Datum int4lt(PG_FUNCTION_ARGS)
Datum int2um(PG_FUNCTION_ARGS)
Datum int2shl(PG_FUNCTION_ARGS)
Datum in_range_int2_int8(PG_FUNCTION_ARGS)
Datum int42div(PG_FUNCTION_ARGS)
Datum int2mi(PG_FUNCTION_ARGS)
Datum int2ne(PG_FUNCTION_ARGS)
Datum int24le(PG_FUNCTION_ARGS)
Datum int2send(PG_FUNCTION_ARGS)
Datum int2mul(PG_FUNCTION_ARGS)
Datum int2smaller(PG_FUNCTION_ARGS)
Datum int2mod(PG_FUNCTION_ARGS)
int2vector * buildint2vector(const int16 *int2s, int n)
Datum int2in(PG_FUNCTION_ARGS)
Datum int24mul(PG_FUNCTION_ARGS)
Datum int42gt(PG_FUNCTION_ARGS)
Datum int4lcm(PG_FUNCTION_ARGS)
Datum in_range_int4_int8(PG_FUNCTION_ARGS)
Datum int2div(PG_FUNCTION_ARGS)
Datum in_range_int2_int2(PG_FUNCTION_ARGS)
Datum int4in(PG_FUNCTION_ARGS)
Datum int2shr(PG_FUNCTION_ARGS)
Datum in_range_int2_int4(PG_FUNCTION_ARGS)
static int32 int4gcd_internal(int32 arg1, int32 arg2)
Datum int2vectorout(PG_FUNCTION_ARGS)
Datum i4toi2(PG_FUNCTION_ARGS)
Datum int4ge(PG_FUNCTION_ARGS)
Datum int4and(PG_FUNCTION_ARGS)
Datum int4send(PG_FUNCTION_ARGS)
Datum int24ge(PG_FUNCTION_ARGS)
Datum in_range_int4_int2(PG_FUNCTION_ARGS)
Datum int2vectorin(PG_FUNCTION_ARGS)
Datum bool_int4(PG_FUNCTION_ARGS)
Datum int4inc(PG_FUNCTION_ARGS)
Datum int4shr(PG_FUNCTION_ARGS)
Datum int4larger(PG_FUNCTION_ARGS)
Datum int24ne(PG_FUNCTION_ARGS)
Datum int2gt(PG_FUNCTION_ARGS)
Datum int24lt(PG_FUNCTION_ARGS)
Datum int42pl(PG_FUNCTION_ARGS)
Datum in_range_int4_int4(PG_FUNCTION_ARGS)
Datum int4ne(PG_FUNCTION_ARGS)
Datum int42le(PG_FUNCTION_ARGS)
Datum i2toi4(PG_FUNCTION_ARGS)
Datum int4smaller(PG_FUNCTION_ARGS)
Datum int24pl(PG_FUNCTION_ARGS)
Datum int4_bool(PG_FUNCTION_ARGS)
Datum int4mod(PG_FUNCTION_ARGS)
Datum int24div(PG_FUNCTION_ARGS)
Datum int4xor(PG_FUNCTION_ARGS)
Datum generate_series_step_int4(PG_FUNCTION_ARGS)
Datum int2larger(PG_FUNCTION_ARGS)
Datum int2and(PG_FUNCTION_ARGS)
Datum int4not(PG_FUNCTION_ARGS)
Datum int4abs(PG_FUNCTION_ARGS)
Datum int4out(PG_FUNCTION_ARGS)
Datum generate_series_int4_support(PG_FUNCTION_ARGS)
Datum int4mul(PG_FUNCTION_ARGS)
Datum int4eq(PG_FUNCTION_ARGS)
Datum int4le(PG_FUNCTION_ARGS)
Datum int42ne(PG_FUNCTION_ARGS)
Datum int4mi(PG_FUNCTION_ARGS)
Datum int42lt(PG_FUNCTION_ARGS)
Datum int2pl(PG_FUNCTION_ARGS)
Datum int4up(PG_FUNCTION_ARGS)
Datum int2vectorsend(PG_FUNCTION_ARGS)
Datum int2recv(PG_FUNCTION_ARGS)
Datum int42mi(PG_FUNCTION_ARGS)
Datum int4or(PG_FUNCTION_ARGS)
Datum int2or(PG_FUNCTION_ARGS)
static bool pg_sub_s16_overflow(int16 a, int16 b, int16 *result)
static bool pg_mul_s32_overflow(int32 a, int32 b, int32 *result)
static bool pg_mul_s16_overflow(int16 a, int16 b, int16 *result)
static bool pg_add_s16_overflow(int16 a, int16 b, int16 *result)
static bool pg_sub_s32_overflow(int32 a, int32 b, int32 *result)
static bool pg_add_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_add_s32_overflow(int32 a, int32 b, int32 *result)
void * repalloc(void *pointer, Size size)
void * palloc0(Size size)
static bool is_funcclause(const void *clause)
#define IsA(nodeptr, _type_)
int pg_ltoa(int32 value, char *a)
int32 pg_strtoint32_safe(const char *s, Node *escontext)
int pg_itoa(int16 i, char *a)
int16 pg_strtoint16_safe(const char *s, Node *escontext)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static int list_length(const List *l)
static char buf[DEFAULT_XLOG_SEG_SIZE]
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
struct StringInfoData * StringInfo
int16 values[FLEXIBLE_ARRAY_MEMBER]
static uint32 gcd(uint32 a, uint32 b)
static void SET_VARSIZE(void *PTR, Size len)