PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include "common/int.h"
#include "funcapi.h"
#include "libpq/pqformat.h"
#include "nodes/nodeFuncs.h"
#include "nodes/supportnodes.h"
#include "optimizer/optimizer.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
struct | generate_series_fctx |
Datum dtoi8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1298 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, FLOAT8_FITS_IN_INT64, PG_GETARG_FLOAT8, PG_RETURN_INT64, and unlikely.
Referenced by int8_to_char().
Datum ftoi8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1333 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, FLOAT4_FITS_IN_INT64, PG_GETARG_FLOAT4, PG_RETURN_INT64, and unlikely.
Datum generate_series_int8 | ( | PG_FUNCTION_ARGS | ) |
Datum generate_series_int8_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1460 of file int8.c.
References generate_unaccent_rules::args, DatumGetInt64(), estimate_expression_value(), is_funcclause(), IsA, linitial, list_length(), lsecond, lthird, SupportRequestRows::node, PG_GETARG_POINTER, PG_RETURN_POINTER, SupportRequestRows::root, and SupportRequestRows::rows.
Datum generate_series_step_int8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1384 of file int8.c.
References generate_series_fctx::current, ereport, errcode(), errmsg(), ERROR, generate_series_fctx::finish, Int64GetDatum(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, palloc(), pg_add_s64_overflow(), PG_GETARG_INT64, PG_NARGS, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, generate_series_fctx::step, and FuncCallContext::user_fctx.
Referenced by generate_series_int8().
Datum i8tod | ( | PG_FUNCTION_ARGS | ) |
Datum i8tof | ( | PG_FUNCTION_ARGS | ) |
Datum i8tooid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1354 of file int8.c.
References arg, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_RETURN_OID, PG_UINT32_MAX, and unlikely.
Datum in_range_int8_int8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 402 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_BOOL, PG_GETARG_INT64, PG_RETURN_BOOL, unlikely, and val.
Datum int28 | ( | PG_FUNCTION_ARGS | ) |
Datum int28div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1156 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int28eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 342 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 387 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 369 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 378 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 360 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1128 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, PG_RETURN_INT64, pg_sub_s64_overflow(), and unlikely.
Datum int28mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1142 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Datum int28ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 351 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int28pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1114 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT16, PG_GETARG_INT64, PG_RETURN_INT64, and unlikely.
Datum int48 | ( | PG_FUNCTION_ARGS | ) |
Datum int48div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1014 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int48eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 228 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 273 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 255 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 264 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 246 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 986 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_INT64, pg_sub_s64_overflow(), and unlikely.
Datum int48mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1000 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Datum int48ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 237 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int48pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 972 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_INT64, and unlikely.
Datum int82 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1271 of file int8.c.
References arg, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_INT16_MAX, PG_INT16_MIN, PG_RETURN_INT16, and unlikely.
Datum int82div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1075 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, PG_INT64_MIN, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int82eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 285 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 330 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 312 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 321 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 303 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1047 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, PG_RETURN_INT64, pg_sub_s64_overflow(), and unlikely.
Datum int82mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1061 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT16, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Datum int82ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 294 of file int8.c.
References PG_GETARG_INT16, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int82pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1033 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT16, PG_GETARG_INT64, PG_RETURN_INT64, and unlikely.
Datum int84 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1250 of file int8.c.
References arg, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_INT32_MAX, PG_INT32_MIN, PG_RETURN_INT32, and unlikely.
Referenced by int8_to_char().
Datum int84div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 933 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, PG_INT64_MIN, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int84eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 171 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 216 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 198 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 207 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 189 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 905 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_INT64, pg_sub_s64_overflow(), and unlikely.
Datum int84mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 919 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Datum int84ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 180 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_BOOL.
Datum int84pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 891 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_INT64, and unlikely.
Datum int8abs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 547 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_INT64_MIN, PG_RETURN_INT64, and unlikely.
Datum int8and | ( | PG_FUNCTION_ARGS | ) |
Datum int8dec | ( | PG_FUNCTION_ARGS | ) |
Definition at line 758 of file int8.c.
References AggCheckCallContext(), arg, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_GETARG_POINTER, PG_RETURN_INT64, PG_RETURN_POINTER, pg_sub_s64_overflow(), and unlikely.
Referenced by int8dec_any().
Datum int8dec_any | ( | PG_FUNCTION_ARGS | ) |
Datum int8div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 505 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_INT64_MIN, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int8eq | ( | PG_FUNCTION_ARGS | ) |
Datum int8gcd | ( | PG_FUNCTION_ARGS | ) |
Definition at line 668 of file int8.c.
References int8gcd_internal(), PG_GETARG_INT64, and PG_RETURN_INT64.
|
static |
Datum int8ge | ( | PG_FUNCTION_ARGS | ) |
Datum int8gt | ( | PG_FUNCTION_ARGS | ) |
Datum int8in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 51 of file int8.c.
References PG_GETARG_CSTRING, PG_RETURN_INT64, and pg_strtoint64_safe().
Referenced by defGetInt64().
Datum int8inc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 720 of file int8.c.
References AggCheckCallContext(), arg, ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT64, PG_GETARG_POINTER, PG_RETURN_INT64, PG_RETURN_POINTER, and unlikely.
Referenced by int8inc_any(), and int8inc_float8_float8().
Datum int8inc_any | ( | PG_FUNCTION_ARGS | ) |
Datum int8inc_float8_float8 | ( | PG_FUNCTION_ARGS | ) |
Datum int8inc_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 827 of file int8.c.
References FRAMEOPTION_END_UNBOUNDED_FOLLOWING, FRAMEOPTION_START_UNBOUNDED_PRECEDING, WindowClause::frameOptions, IsA, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_BOTH, MONOTONICFUNC_DECREASING, MONOTONICFUNC_INCREASING, MONOTONICFUNC_NONE, NIL, WindowClause::orderClause, PG_GETARG_POINTER, PG_RETURN_POINTER, and SupportRequestWFuncMonotonic::window_clause.
Datum int8larger | ( | PG_FUNCTION_ARGS | ) |
Datum int8lcm | ( | PG_FUNCTION_ARGS | ) |
Definition at line 683 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, gcd(), int8gcd_internal(), PG_GETARG_INT64, PG_INT64_MIN, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Datum int8le | ( | PG_FUNCTION_ARGS | ) |
Datum int8lt | ( | PG_FUNCTION_ARGS | ) |
Datum int8mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 477 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_RETURN_INT64, pg_sub_s64_overflow(), and unlikely.
Datum int8mod | ( | PG_FUNCTION_ARGS | ) |
Definition at line 564 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_RETURN_INT64, PG_RETURN_NULL, and unlikely.
Datum int8mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 491 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_INT64, and unlikely.
Referenced by int4_cash(), int8_cash(), and int8_to_char().
Datum int8ne | ( | PG_FUNCTION_ARGS | ) |
Datum int8not | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1212 of file int8.c.
References PG_GETARG_INT64, and PG_RETURN_INT64.
Datum int8or | ( | PG_FUNCTION_ARGS | ) |
Datum int8out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 62 of file int8.c.
References buf, len, MAXINT8LEN, palloc(), PG_GETARG_INT64, pg_lltoa(), PG_RETURN_CSTRING, and val.
Referenced by int8_to_char().
Datum int8pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 463 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s64_overflow(), PG_GETARG_INT64, PG_RETURN_INT64, and unlikely.
Datum int8recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 84 of file int8.c.
References buf, PG_GETARG_POINTER, PG_RETURN_INT64, and pq_getmsgint64().
Datum int8send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 95 of file int8.c.
References buf, PG_GETARG_INT64, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendint64().
Datum int8shl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1220 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_INT64.
Datum int8shr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1229 of file int8.c.
References PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_INT64.
Datum int8smaller | ( | PG_FUNCTION_ARGS | ) |
Datum int8um | ( | PG_FUNCTION_ARGS | ) |
Definition at line 441 of file int8.c.
References arg, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT64, PG_INT64_MIN, PG_RETURN_INT64, and unlikely.
Datum int8up | ( | PG_FUNCTION_ARGS | ) |
Definition at line 455 of file int8.c.
References arg, PG_GETARG_INT64, and PG_RETURN_INT64.
Datum int8xor | ( | PG_FUNCTION_ARGS | ) |
Datum oidtoi8 | ( | PG_FUNCTION_ARGS | ) |