29 #define OidVectorSize(n) (offsetof(oidvector, values) + (n) * sizeof(Oid))
50 char *result = (
char *)
palloc(12);
94 memcpy(result->
values, oids, n *
sizeof(
Oid));
117 Node *escontext = fcinfo->context;
127 while (*oidString && isspace((
unsigned char) *oidString))
129 if (*oidString ==
'\0')
162 nnums = oidArray->
dim1;
167 rp = result = (
char *)
palloc(nnums * 12 + 1);
168 for (num = 0; num < nnums; num++)
173 while (*++rp !=
'\0')
200 locfcinfo->args[0].isnull =
false;
202 locfcinfo->args[1].isnull =
false;
204 locfcinfo->args[2].isnull =
false;
208 Assert(!locfcinfo->isnull);
216 (
errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
217 errmsg(
"invalid oidvector data")));
260 Oid v1 = *((
const Oid *) p1);
Datum array_recv(PG_FUNCTION_ARGS)
Datum array_send(PG_FUNCTION_ARGS)
#define Assert(condition)
static void PGresult const char * p2
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_POINTER(n)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
#define PG_RETURN_CSTRING(x)
#define LOCAL_FCINFO(name, nargs)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
static int pg_cmp_u32(uint32 a, uint32 b)
void * palloc0(Size size)
void * repalloc(void *pointer, Size size)
#define SOFT_ERROR_OCCURRED(escontext)
Datum btoidvectorcmp(PG_FUNCTION_ARGS)
#define castNode(_type_, nodeptr)
uint32 uint32in_subr(const char *s, char **endloc, const char *typname, Node *escontext)
Datum oidvectorin(PG_FUNCTION_ARGS)
Datum oidvectoreq(PG_FUNCTION_ARGS)
Datum oidvectorle(PG_FUNCTION_ARGS)
Datum oidvectorout(PG_FUNCTION_ARGS)
Datum oidvectorgt(PG_FUNCTION_ARGS)
Datum oidvectorge(PG_FUNCTION_ARGS)
Datum oidrecv(PG_FUNCTION_ARGS)
Datum oidsmaller(PG_FUNCTION_ARGS)
Datum oideq(PG_FUNCTION_ARGS)
Datum oidvectorsend(PG_FUNCTION_ARGS)
Datum oidvectorrecv(PG_FUNCTION_ARGS)
Datum oidvectorlt(PG_FUNCTION_ARGS)
int oid_cmp(const void *p1, const void *p2)
Datum oidin(PG_FUNCTION_ARGS)
Datum oidlt(PG_FUNCTION_ARGS)
Datum oidge(PG_FUNCTION_ARGS)
Datum oidout(PG_FUNCTION_ARGS)
Datum oidsend(PG_FUNCTION_ARGS)
Datum oidle(PG_FUNCTION_ARGS)
oidvector * buildoidvector(const Oid *oids, int n)
Datum oidne(PG_FUNCTION_ARGS)
Datum oidvectorne(PG_FUNCTION_ARGS)
Datum oidgt(PG_FUNCTION_ARGS)
Datum oidlarger(PG_FUNCTION_ARGS)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
static int cmp(const chr *x, const chr *y, size_t len)
StringInfoData * StringInfo
Oid values[FLEXIBLE_ARRAY_MEMBER]
#define SET_VARSIZE(PTR, len)