40 .
name =
"tupdesc reference",
70 dst->attcacheoff = -1;
71 dst->attlen = src->attlen;
73 dst->attbyval = src->attbyval;
75 dst->atthasmissing = src->atthasmissing;
76 dst->attisdropped = src->attisdropped;
77 dst->attgenerated = (src->attgenerated !=
'\0');
89 switch (src->attalign)
105 elog(
ERROR,
"invalid attalign value: %c", src->attalign);
144#ifdef USE_ASSERT_CHECKING
236 for (
i = 0;
i < natts; ++
i)
272 att->attnotnull =
false;
273 att->atthasdef =
false;
274 att->atthasmissing =
false;
275 att->attidentity =
'\0';
276 att->attgenerated =
'\0';
318 att->attnotnull =
false;
319 att->atthasdef =
false;
320 att->atthasmissing =
false;
321 att->attidentity =
'\0';
322 att->attgenerated =
'\0';
374 for (
i =
cpy->num_defval - 1;
i >= 0;
i--)
382 for (
i = tupdesc->
natts - 1;
i >= 0;
i--)
399 for (
i =
cpy->num_check - 1;
i >= 0;
i--)
439 for (
i = 0;
i <
dst->natts;
i++)
443 att->attnotnull =
false;
444 att->atthasdef =
false;
445 att->atthasmissing =
false;
446 att->attidentity =
'\0';
447 att->attgenerated =
'\0';
457 dst->tdrefcount = -1;
489 dstAtt->attnotnull =
false;
490 dstAtt->atthasdef =
false;
491 dstAtt->atthasmissing =
false;
492 dstAtt->attidentity =
'\0';
493 dstAtt->attgenerated =
'\0';
526 for (
i = tupdesc->
natts - 1;
i >= 0;
i--)
635 if (
attr1->attcompression !=
attr2->attcompression)
645 if (
attr1->attnotnull)
661 if (
attr1->attgenerated !=
attr2->attgenerated)
663 if (
attr1->attisdropped !=
attr2->attisdropped)
669 if (
attr1->attcollation !=
attr2->attcollation)
683 if (
constr1->has_generated_stored !=
constr2->has_generated_stored)
685 if (
constr1->has_generated_virtual !=
constr2->has_generated_virtual)
688 if (n != (
int)
constr2->num_defval)
691 for (
i = 0;
i < n;
i++)
725 if (n != (
int)
constr2->num_check)
733 for (
i = 0;
i < n;
i++)
795 if (
attr1->attcollation !=
attr2->attcollation)
799 if (
attr1->attisdropped !=
attr2->attisdropped)
879 att->atttypmod = typmod;
884 att->attnotnull =
false;
885 att->atthasdef =
false;
886 att->atthasmissing =
false;
887 att->attidentity =
'\0';
888 att->attgenerated =
'\0';
889 att->attisdropped =
false;
890 att->attislocal =
true;
891 att->attinhcount = 0;
942 att->atttypmod = typmod;
947 att->attnotnull =
false;
948 att->atthasdef =
false;
949 att->atthasmissing =
false;
950 att->attidentity =
'\0';
951 att->attgenerated =
'\0';
952 att->attisdropped =
false;
953 att->attislocal =
true;
954 att->attinhcount = 0;
969 att->attbyval =
false;
978 att->attbyval =
true;
987 att->attbyval =
true;
996 att->attbyval =
true;
1005 att->attbyval =
true;
1072 forfour(l1, names, l2,
types, l3, typmods, l4, collations)
1131 return psprintf(
"TupleDesc %p (%u,%d)",
#define Assert(condition)
#define MemSet(start, val, len)
bool IsCatalogRelationOid(Oid relid)
Datum datumCopy(Datum value, bool typByVal, int typLen)
bool datumIsEqual(Datum value1, Datum value2, bool typByVal, int typLen)
#define palloc0_object(type)
uint32 hash_bytes_uint32(uint32 k)
static uint32 hash_combine(uint32 a, uint32 b)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
char * pstrdup(const char *in)
void pfree(void *pointer)
void namestrcpy(Name name, const char *str)
#define ATTRIBUTE_FIXED_PART_SIZE
FormData_pg_attribute * Form_pg_attribute
static int list_length(const List *l)
#define forfour(cell1, list1, cell2, list2, cell3, list3, cell4, list4)
FormData_pg_type * Form_pg_type
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
char * psprintf(const char *fmt,...)
void * stringToNode(const char *str)
ResourceOwner CurrentResourceOwner
void ResourceOwnerForget(ResourceOwner owner, Datum value, const ResourceOwnerDesc *kind)
void ResourceOwnerRemember(ResourceOwner owner, Datum value, const ResourceOwnerDesc *kind)
void ResourceOwnerEnlarge(ResourceOwner owner)
@ RESOURCE_RELEASE_AFTER_LOCKS
#define RELEASE_PRIO_TUPDESC_REFS
bool has_generated_virtual
bool has_generated_stored
struct AttrMissing * missing
CompactAttribute compact_attrs[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define InvalidCompressionMethod
TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc)
void TupleDescCopy(TupleDesc dst, TupleDesc src)
static void populate_compact_attribute_internal(Form_pg_attribute src, CompactAttribute *dst)
Node * TupleDescGetDefault(TupleDesc tupdesc, AttrNumber attnum)
void DecrTupleDescRefCount(TupleDesc tupdesc)
void FreeTupleDesc(TupleDesc tupdesc)
void IncrTupleDescRefCount(TupleDesc tupdesc)
void verify_compact_attribute(TupleDesc tupdesc, int attnum)
TupleDesc CreateTemplateTupleDesc(int natts)
static void ResourceOwnerRememberTupleDesc(ResourceOwner owner, TupleDesc tupdesc)
static void ResourceOwnerForgetTupleDesc(ResourceOwner owner, TupleDesc tupdesc)
static void ResOwnerReleaseTupleDesc(Datum res)
uint32 hashRowType(TupleDesc desc)
TupleDesc CreateTupleDescTruncatedCopy(TupleDesc tupdesc, int natts)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
void TupleDescInitBuiltinEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
static const ResourceOwnerDesc tupdesc_resowner_desc
TupleDesc BuildDescFromLists(const List *names, const List *types, const List *typmods, const List *collations)
void populate_compact_attribute(TupleDesc tupdesc, int attnum)
bool equalRowTypes(TupleDesc tupdesc1, TupleDesc tupdesc2)
void TupleDescInitEntryCollation(TupleDesc desc, AttrNumber attributeNumber, Oid collationid)
TupleDesc CreateTupleDesc(int natts, Form_pg_attribute *attrs)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
bool equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2)
void TupleDescCopyEntry(TupleDesc dst, AttrNumber dstAttno, TupleDesc src, AttrNumber srcAttno)
static char * ResOwnerPrintTupleDesc(Datum res)
#define TupleDescSize(src)
#define ATTNULLABLE_UNKNOWN
#define ATTNULLABLE_VALID
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
struct TupleDescData * TupleDesc
#define ATTNULLABLE_UNRESTRICTED