24 #include "utils/fmgrprotos.h"
48 if (!relispartition && !RELKIND_HAS_PARTITIONS(relkind))
65 #define PG_PARTITION_TREE_COLS 4
129 MemSet(nulls, 0,
sizeof(nulls));
136 if (ancestors !=
NIL)
147 if (relid != rootrelid)
149 foreach(lc, ancestors)
191 if (ancestors ==
NIL)
static Datum values[MAXATTR]
#define MemSet(start, val, len)
#define OidIsValid(objectId)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define HeapTupleGetDatum(tuple)
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
#define SRF_RETURN_DONE(_funcctx)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, Datum *values, bool *isnull)
Assert(fmt[strlen(fmt) - 1] !='\n')
void list_free(List *list)
List * lcons_oid(Oid datum, List *list)
bool get_rel_relispartition(Oid relid)
char get_rel_relkind(Oid relid)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
List * get_partition_ancestors(Oid relid)
Datum pg_partition_tree(PG_FUNCTION_ARGS)
#define PG_PARTITION_TREE_COLS
Datum pg_partition_root(PG_FUNCTION_ARGS)
static bool check_rel_can_be_partition(Oid relid)
Datum pg_partition_ancestors(PG_FUNCTION_ARGS)
List * find_all_inheritors(Oid parentrelId, LOCKMODE lockmode, List **numparents)
static int list_length(const List *l)
static Oid list_nth_oid(const List *list, int n)
#define ObjectIdGetDatum(X)
MemoryContext multi_call_memory_ctx
#define SearchSysCacheExists1(cacheId, key1)
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)