18#include "utils/uuid.h"
19#include "utils/fmgrprotos.h"
44 char *str = PG_GETARG_CSTRING(0);
45 Datum uuid_d = DirectFunctionCall1(uuid_in, CStringGetDatum(str));
47 memcpy(&result->
tok, DatumGetUUIDP(uuid_d),
sizeof(
pg_uuid_t));
48 PG_RETURN_POINTER(result);
59 return DirectFunctionCall1(uuid_out, UUIDPGetDatum(&rv->
tok));
80 PG_RETURN_POINTER(result);
Datum random_variable_in(PG_FUNCTION_ARGS)
Parse a random_variable from its text representation.
Datum random_variable_out(PG_FUNCTION_ARGS)
Render a random_variable as a hyphenated UUID string.
Datum random_variable_make(PG_FUNCTION_ARGS)
Build a random_variable from a UUID.
Binary internal layout of random_variable.
pg_uuid_t tok
Provenance gate UUID.