PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/hashfn.h"
#include "lib/hyperloglog.h"
#include "libpq/pqformat.h"
#include "port/pg_bswap.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/sortsupport.h"
#include "utils/uuid.h"
Go to the source code of this file.
Data Structures | |
struct | uuid_sortsupport_state |
Functions | |
static void | string_to_uuid (const char *source, pg_uuid_t *uuid, Node *escontext) |
static int | uuid_internal_cmp (const pg_uuid_t *arg1, const pg_uuid_t *arg2) |
static int | uuid_fast_cmp (Datum x, Datum y, SortSupport ssup) |
static bool | uuid_abbrev_abort (int memtupcount, SortSupport ssup) |
static Datum | uuid_abbrev_convert (Datum original, SortSupport ssup) |
Datum | uuid_in (PG_FUNCTION_ARGS) |
Datum | uuid_out (PG_FUNCTION_ARGS) |
Datum | uuid_recv (PG_FUNCTION_ARGS) |
Datum | uuid_send (PG_FUNCTION_ARGS) |
Datum | uuid_lt (PG_FUNCTION_ARGS) |
Datum | uuid_le (PG_FUNCTION_ARGS) |
Datum | uuid_eq (PG_FUNCTION_ARGS) |
Datum | uuid_ge (PG_FUNCTION_ARGS) |
Datum | uuid_gt (PG_FUNCTION_ARGS) |
Datum | uuid_ne (PG_FUNCTION_ARGS) |
Datum | uuid_cmp (PG_FUNCTION_ARGS) |
Datum | uuid_sortsupport (PG_FUNCTION_ARGS) |
Datum | uuid_hash (PG_FUNCTION_ARGS) |
Datum | uuid_hash_extended (PG_FUNCTION_ARGS) |
Datum | gen_random_uuid (PG_FUNCTION_ARGS) |
Datum gen_random_uuid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 406 of file uuid.c.
References pg_uuid_t::data, ereport, errcode(), errmsg(), ERROR, palloc(), PG_RETURN_UUID_P, pg_strong_random(), and UUID_LEN.
Referenced by pg_random_uuid().
Definition at line 90 of file uuid.c.
References pg_uuid_t::data, ereturn, errcode(), errmsg(), i, source, syntax_error(), and UUID_LEN.
Referenced by uuid_in().
|
static |
Definition at line 287 of file uuid.c.
References uuid_sortsupport_state::abbr_card, elog(), estimateHyperLogLog(), uuid_sortsupport_state::estimating, uuid_sortsupport_state::input_count, INT64_FORMAT, LOG, SortSupportData::ssup_extra, and trace_sort.
Referenced by uuid_sortsupport().
|
static |
Definition at line 353 of file uuid.c.
References uuid_sortsupport_state::abbr_card, addHyperLogLog(), pg_uuid_t::data, DatumGetUInt32(), DatumGetUUIDP(), uuid_sortsupport_state::estimating, hash_uint32(), uuid_sortsupport_state::input_count, res, and SortSupportData::ssup_extra.
Referenced by uuid_sortsupport().
Datum uuid_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 224 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_INT32, and uuid_internal_cmp().
Datum uuid_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 187 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
|
static |
Definition at line 272 of file uuid.c.
References DatumGetUUIDP(), uuid_internal_cmp(), x, and y.
Referenced by uuid_sortsupport().
Datum uuid_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 196 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
Datum uuid_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 205 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
Datum uuid_hash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 390 of file uuid.c.
References hash_any(), sort-test::key, PG_GETARG_UUID_P, and UUID_LEN.
Datum uuid_hash_extended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 398 of file uuid.c.
References hash_any_extended(), sort-test::key, PG_GETARG_INT64, PG_GETARG_UUID_P, and UUID_LEN.
Datum uuid_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 41 of file uuid.c.
References palloc(), PG_GETARG_CSTRING, PG_RETURN_UUID_P, and string_to_uuid().
Referenced by uuid_generate_internal().
Definition at line 163 of file uuid.c.
References pg_uuid_t::data, and UUID_LEN.
Referenced by uuid_cmp(), uuid_eq(), uuid_fast_cmp(), uuid_ge(), uuid_gt(), uuid_le(), uuid_lt(), and uuid_ne().
Datum uuid_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 178 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
Referenced by brin_minmax_multi_distance_uuid().
Datum uuid_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 169 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
Datum uuid_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 214 of file uuid.c.
References PG_GETARG_UUID_P, PG_RETURN_BOOL, and uuid_internal_cmp().
Datum uuid_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 52 of file uuid.c.
References appendStringInfoChar(), buf, pg_uuid_t::data, i, initStringInfo(), PG_GETARG_UUID_P, PG_RETURN_CSTRING, and UUID_LEN.
Datum uuid_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 140 of file uuid.c.
References pg_uuid_t::data, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, pq_getmsgbytes(), and UUID_LEN.
Datum uuid_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 151 of file uuid.c.
References pg_uuid_t::data, PG_GETARG_UUID_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendbytes(), and UUID_LEN.
Datum uuid_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 236 of file uuid.c.
References uuid_sortsupport_state::abbr_card, SortSupportData::abbrev_abort, SortSupportData::abbrev_converter, SortSupportData::abbrev_full_comparator, SortSupportData::abbreviate, SortSupportData::comparator, uuid_sortsupport_state::estimating, initHyperLogLog(), uuid_sortsupport_state::input_count, MemoryContextSwitchTo(), palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_cxt, ssup_datum_unsigned_cmp(), SortSupportData::ssup_extra, uuid_abbrev_abort(), uuid_abbrev_convert(), and uuid_fast_cmp().