30 #include "nodes/nodetags.h"
120 #define pg_node_attr(...)
133 #define nodeTag(nodeptr) (((const Node*)(nodeptr))->type)
149 #define newNode(size, tag) \
151 AssertMacro((size) >= sizeof(Node)); \
152 _result = (Node *) palloc0fast(size); \
153 _result->type = (tag); \
166 #define newNode(size, tag) \
168 AssertMacro((size) >= sizeof(Node)), \
169 newNodeMacroHolder = (Node *) palloc0fast(size), \
170 newNodeMacroHolder->type = (tag), \
176 #define makeNode(_type_) ((_type_ *) newNode(sizeof(_type_),T_##_type_))
177 #define NodeSetTag(nodeptr,t) (((Node*)(nodeptr))->type = (t))
179 #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
188 #ifdef USE_ASSERT_CHECKING
195 #define castNode(_type_, nodeptr) ((_type_ *) castNodeImpl(T_##_type_, nodeptr))
197 #define castNode(_type_, nodeptr) ((_type_ *) (nodeptr))
217 int typlen,
bool typbyval);
225 #ifdef WRITE_READ_PARSE_PLAN_TREES
226 extern void *stringToNodeWithLocations(
const char *
str);
229 extern uintptr_t
readDatum(
bool typbyval);
242 #define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj))
244 #define copyObject(obj) copyObjectImpl(obj)
250 extern bool equal(
const void *
a,
const void *
b);
348 #define IS_OUTER_JOIN(jointype) \
349 (((1 << (jointype)) & \
350 ((1 << JOIN_LEFT) | \
352 (1 << JOIN_RIGHT) | \
354 (1 << JOIN_RIGHT_ANTI))) != 0)
378 #define AGGSPLITOP_COMBINE 0x01
379 #define AGGSPLITOP_SKIPFINAL 0x02
380 #define AGGSPLITOP_SERIALIZE 0x04
381 #define AGGSPLITOP_DESERIALIZE 0x08
395 #define DO_AGGSPLIT_COMBINE(as) (((as) & AGGSPLITOP_COMBINE) != 0)
396 #define DO_AGGSPLIT_SKIPFINAL(as) (((as) & AGGSPLITOP_SKIPFINAL) != 0)
397 #define DO_AGGSPLIT_SERIALIZE(as) (((as) & AGGSPLITOP_SERIALIZE) != 0)
398 #define DO_AGGSPLIT_DESERIALIZE(as) (((as) & AGGSPLITOP_DESERIALIZE) != 0)
Assert(fmt[strlen(fmt) - 1] !='\n')
void outToken(struct StringInfoData *str, const char *s)
void outDatum(struct StringInfoData *str, uintptr_t value, int typlen, bool typbyval)
int * readIntCols(int numCols)
#define AGGSPLITOP_DESERIALIZE
#define AGGSPLITOP_SKIPFINAL
#define AGGSPLITOP_SERIALIZE
PGDLLIMPORT Node * newNodeMacroHolder
struct Bitmapset * readBitmapset(void)
void outBitmapset(struct StringInfoData *str, const struct Bitmapset *bms)
bool equal(const void *a, const void *b)
char * bmsToString(const struct Bitmapset *bms)
@ AGGSPLIT_FINAL_DESERIAL
@ AGGSPLIT_INITIAL_SERIAL
void * stringToNode(const char *str)
bool * readBoolCols(int numCols)
#define AGGSPLITOP_COMBINE
Oid * readOidCols(int numCols)
void outNode(struct StringInfoData *str, const void *obj)
void * copyObjectImpl(const void *from)
uintptr_t readDatum(bool typbyval)
int16 * readAttrNumberCols(int numCols)
char * nodeToString(const void *obj)