101 errmsg(
"number of pairs (%d) exceeds the maximum allowed (%d)",
178 for (
i = 0;
i < nkeys;
i++)
212 for (
i = 0;
i < nkeys;
i++)
269 for (
i = 0;
i < count; ++
i)
662 for (
i = 0;
i < nkeys; ++
i)
710 for (
i = 0;
i < count; ++
i)
745 nulls = (
bool *)
palloc(
sizeof(
bool) * count);
747 for (
i = 0;
i < count; ++
i)
785 if (count == 0 || ndims == 0)
792 for (
i = 0;
i < count; ++
i)
869 elog(
ERROR,
"return type must be a row type");
982 for (
i = 0; res &&
i < tcount; ++
i)
1044 bool nulls[2] = {
false,
false};
1054 dvalues[1] = (
Datum) 0;
1111 res =
memcmp(str1, str2,
Min(len1, len2));
1117 else if (len1 < len2)
1128 for (
i = 0;
i < count; ++
i)
1147 res = (res > 0) ? 1 : -1;
Datum idx(PG_FUNCTION_ARGS)
#define PG_GETARG_ARRAYTYPE_P(n)
ArrayType * construct_empty_array(Oid elmtype)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
void deconstruct_array_builtin(const ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_GETARG_TEXT_PP(n)
#define DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_INT64(n)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_RETURN_TEXT_P(x)
#define PG_RETURN_INT32(x)
#define PG_RETURN_DATUM(x)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
Datum difference(PG_FUNCTION_ARGS)
static Datum hash_any_extended(const unsigned char *k, int keylen, uint64 seed)
static Datum hash_any(const unsigned char *k, int keylen)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
#define CALCDATASIZE(x, lenstr)
#define HS_FINALIZE(hsp_, count_, buf_, ptr_)
#define HSTORE_KEY(arr_, str_, i_)
#define HS_FIXSIZE(hsp_, count_)
#define PG_GETARG_HSTORE_P(x)
#define HSTORE_VALISNULL(arr_, i_)
#define HSTORE_VALLEN(arr_, i_)
#define HSTORE_KEYLEN(arr_, i_)
#define HS_SETCOUNT(hsp_, c_)
#define HS_COPYITEM(dent_, dbuf_, dptr_, sptr_, klen_, vlen_, vnull_)
#define HSTORE_POLLUTE(newname_, oldname_)
#define HSTORE_VAL(arr_, str_, i_)
Datum hstore_contained(PG_FUNCTION_ARGS)
Datum hstore_cmp(PG_FUNCTION_ARGS)
Datum hstore_slice_to_array(PG_FUNCTION_ARGS)
Datum hstore_slice_to_hstore(PG_FUNCTION_ARGS)
Datum hstore_concat(PG_FUNCTION_ARGS)
Datum hstore_ne(PG_FUNCTION_ARGS)
Datum hstore_contains(PG_FUNCTION_ARGS)
Datum hstore_hash(PG_FUNCTION_ARGS)
Datum hstore_lt(PG_FUNCTION_ARGS)
Datum hstore_each(PG_FUNCTION_ARGS)
Datum hstore_eq(PG_FUNCTION_ARGS)
Datum hstore_delete(PG_FUNCTION_ARGS)
Datum hstore_delete_hstore(PG_FUNCTION_ARGS)
Datum hstore_le(PG_FUNCTION_ARGS)
Datum hstore_ge(PG_FUNCTION_ARGS)
Datum hstore_to_matrix(PG_FUNCTION_ARGS)
Datum hstore_svals(PG_FUNCTION_ARGS)
Datum hstore_avals(PG_FUNCTION_ARGS)
Datum hstore_akeys(PG_FUNCTION_ARGS)
Datum hstore_fetchval(PG_FUNCTION_ARGS)
Datum hstore_delete_array(PG_FUNCTION_ARGS)
Datum hstore_skeys(PG_FUNCTION_ARGS)
static ArrayType * hstore_to_array_internal(HStore *hs, int ndims)
int hstoreFindKey(HStore *hs, int *lowbound, char *key, int keylen)
Datum hstore_hash_extended(PG_FUNCTION_ARGS)
Datum hstore_exists_any(PG_FUNCTION_ARGS)
Pairs * hstoreArrayToPairs(ArrayType *a, int *npairs)
Datum hstore_exists_all(PG_FUNCTION_ARGS)
Datum hstore_gt(PG_FUNCTION_ARGS)
Datum hstore_defined(PG_FUNCTION_ARGS)
Datum hstore_to_array(PG_FUNCTION_ARGS)
Datum hstore_exists(PG_FUNCTION_ARGS)
static void setup_firstcall(FuncCallContext *funcctx, HStore *hs, FunctionCallInfo fcinfo)
#define hstoreUniquePairs
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
static int32 DatumGetInt32(Datum X)
static Size VARSIZE_ANY_EXHDR(const void *PTR)
static Size VARSIZE(const void *PTR)
static char * VARDATA(const void *PTR)
static char * VARDATA_ANY(const void *PTR)
static void SET_VARSIZE(void *PTR, Size len)
text * cstring_to_text_with_len(const char *s, int len)