PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <math.h>
#include <limits.h>
#include <ctype.h>
#include "common/int.h"
#include "port/pg_bitutils.h"
#include "utils/builtins.h"
Go to the source code of this file.
Functions | |
static int | decimalLength32 (const uint32 v) |
static int | decimalLength64 (const uint64 v) |
int16 | pg_strtoint16 (const char *s) |
int16 | pg_strtoint16_safe (const char *s, Node *escontext) |
int32 | pg_strtoint32 (const char *s) |
int32 | pg_strtoint32_safe (const char *s, Node *escontext) |
int64 | pg_strtoint64 (const char *s) |
int64 | pg_strtoint64_safe (const char *s, Node *escontext) |
uint32 | uint32in_subr (const char *s, char **endloc, const char *typname, Node *escontext) |
uint64 | uint64in_subr (const char *s, char **endloc, const char *typname, Node *escontext) |
int | pg_itoa (int16 i, char *a) |
int | pg_ultoa_n (uint32 value, char *a) |
int | pg_ltoa (int32 value, char *a) |
int | pg_ulltoa_n (uint64 value, char *a) |
int | pg_lltoa (int64 value, char *a) |
char * | pg_ultostr_zeropad (char *str, uint32 value, int32 minwidth) |
char * | pg_ultostr (char *str, uint32 value) |
Variables | |
static const char | DIGIT_TABLE [200] |
static const int8 | hexlookup [128] |
|
inlinestatic |
Definition at line 45 of file numutils.c.
References pg_leftmost_one_pos32().
Referenced by pg_ultoa_n().
|
inlinestatic |
Definition at line 64 of file numutils.c.
References pg_leftmost_one_pos64().
Referenced by pg_ulltoa_n().
int pg_itoa | ( | int16 | i, |
char * | a | ||
) |
Definition at line 1042 of file numutils.c.
References a, i, and pg_ltoa().
Referenced by int2out(), int2vectorout(), LogicalTapeImport(), and LogicalTapeSetCreate().
int pg_lltoa | ( | int64 | value, |
char * | a | ||
) |
Definition at line 1227 of file numutils.c.
References a, len, pg_ulltoa_n(), and value.
Referenced by int8out(), and printsimple().
int pg_ltoa | ( | int32 | value, |
char * | a | ||
) |
Definition at line 1120 of file numutils.c.
References a, len, pg_ultoa_n(), and value.
Referenced by executeItemOptUnwrapTarget(), int4out(), pg_itoa(), and printsimple().
int16 pg_strtoint16 | ( | const char * | s | ) |
Definition at line 122 of file numutils.c.
References pg_strtoint16_safe().
Definition at line 128 of file numutils.c.
References ereturn, errcode(), errmsg(), hexlookup, likely, PG_INT16_MAX, PG_INT16_MIN, pg_neg_u16_overflow(), and unlikely.
Referenced by int2in(), and pg_strtoint16().
int32 pg_strtoint32 | ( | const char * | s | ) |
Definition at line 383 of file numutils.c.
References pg_strtoint32_safe().
Referenced by ArrayGetIntegerTypmods(), check_foreign_key(), libpqrcv_endstreaming(), libpqrcv_identify_system(), pq_parse_errornotice(), prsd_headline(), and text_format().
Definition at line 389 of file numutils.c.
References ereturn, errcode(), errmsg(), hexlookup, likely, PG_INT32_MAX, PG_INT32_MIN, pg_neg_u32_overflow(), and unlikely.
Referenced by int4in(), and pg_strtoint32().
int64 pg_strtoint64 | ( | const char * | s | ) |
Definition at line 644 of file numutils.c.
References pg_strtoint64_safe().
Referenced by defGetCopyRejectLimitOption().
int64 pg_strtoint64_safe | ( | const char * | s, |
Node * | escontext | ||
) |
Definition at line 650 of file numutils.c.
References ereturn, errcode(), errmsg(), hexlookup, likely, PG_INT64_MAX, PG_INT64_MIN, pg_neg_u64_overflow(), and unlikely.
Referenced by int8in(), make_const(), and pg_strtoint64().
int pg_ulltoa_n | ( | uint64 | value, |
char * | a | ||
) |
Definition at line 1140 of file numutils.c.
References a, decimalLength64(), DIGIT_TABLE, i, and value.
Referenced by BuildQueryCompletionString(), and pg_lltoa().
int pg_ultoa_n | ( | uint32 | value, |
char * | a | ||
) |
Definition at line 1055 of file numutils.c.
References a, decimalLength32(), DIGIT_TABLE, i, and value.
Referenced by pg_ltoa(), pg_ultostr(), pg_ultostr_zeropad(), and printsimple().
char* pg_ultostr | ( | char * | str, |
uint32 | value | ||
) |
Definition at line 1307 of file numutils.c.
References len, pg_ultoa_n(), str, and value.
Referenced by AppendSeconds().
Definition at line 1267 of file numutils.c.
References Assert, DIGIT_TABLE, len, pg_ultoa_n(), str, and value.
Referenced by AppendSeconds(), EncodeDateOnly(), EncodeDateTime(), EncodeTimeOnly(), and EncodeTimezone().
Definition at line 898 of file numutils.c.
References ereturn, errcode(), errmsg(), and typname.
Referenced by cidin(), oidin(), oidparse(), oidvectorin(), and xidin().
uint64 uint64in_subr | ( | const char * | s, |
char ** | endloc, | ||
const char * | typname, | ||
Node * | escontext | ||
) |
|
static |
Definition at line 29 of file numutils.c.
Referenced by pg_ulltoa_n(), pg_ultoa_n(), pg_ultostr_zeropad(), to_chars(), to_chars_df(), and to_chars_f().
|
static |
Definition at line 88 of file numutils.c.
Referenced by pg_strtoint16_safe(), pg_strtoint32_safe(), and pg_strtoint64_safe().