27 #define OidVectorSize(n) (offsetof(oidvector, values) + (n) * sizeof(Oid))
43 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
44 errmsg(
"invalid input syntax for type %s: \"%s\"",
48 cvt = strtoul(s, &endptr, 10);
55 if (errno && errno != ERANGE && errno != EINVAL)
57 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
58 errmsg(
"invalid input syntax for type %s: \"%s\"",
61 if (endptr == s && *s !=
'\0')
63 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
64 errmsg(
"invalid input syntax for type %s: \"%s\"",
69 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
70 errmsg(
"value \"%s\" is out of range for type %s",
81 while (*endptr && isspace((
unsigned char) *endptr))
85 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
86 errmsg(
"invalid input syntax for type %s: \"%s\"",
104 #if OID_MAX != ULONG_MAX
105 if (cvt != (
unsigned long) result &&
106 cvt != (
unsigned long) ((
int) result))
108 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
109 errmsg(
"value \"%s\" is out of range for type %s",
130 char *result = (
char *)
palloc(12);
174 memcpy(result->
values, oids, n *
sizeof(
Oid));
204 while (*oidString && isspace((
unsigned char) *oidString))
206 if (*oidString ==
'\0')
210 while (*oidString && isspace((
unsigned char) *oidString))
214 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
215 errmsg(
"oidvector has too many elements")));
235 nnums = oidArray->
dim1;
240 rp = result = (
char *)
palloc(nnums * 12 + 1);
241 for (num = 0; num < nnums; num++)
246 while (*++rp !=
'\0')
273 locfcinfo->args[0].isnull =
false;
275 locfcinfo->args[1].isnull =
false;
277 locfcinfo->args[2].isnull =
false;
281 Assert(!locfcinfo->isnull);
289 (
errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
290 errmsg(
"invalid oidvector data")));
295 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
296 errmsg(
"oidvector has too many elements")));
338 Oid v1 = *((
const Oid *) p1);
Datum array_recv(PG_FUNCTION_ARGS)
Datum array_send(PG_FUNCTION_ARGS)
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)
Assert(fmt[strlen(fmt) - 1] !='\n')
void * palloc0(Size size)
Datum btoidvectorcmp(PG_FUNCTION_ARGS)
#define castNode(_type_, nodeptr)
static Oid oidin_subr(const char *s, char **endloc)
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)
#define DatumGetPointer(X)
#define ObjectIdGetDatum(X)
#define SET_VARSIZE(PTR, len)
#define PointerGetDatum(X)
static int cmp(const chr *x, const chr *y, size_t len)
StringInfoData * StringInfo
Oid values[FLEXIBLE_ARRAY_MEMBER]