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');
127#ifdef USE_ASSERT_CHECKING
219 for (
i = 0;
i < natts; ++
i)
255 att->attnotnull =
false;
256 att->atthasdef =
false;
257 att->atthasmissing =
false;
258 att->attidentity =
'\0';
259 att->attgenerated =
'\0';
301 att->attnotnull =
false;
302 att->atthasdef =
false;
303 att->atthasmissing =
false;
304 att->attidentity =
'\0';
305 att->attgenerated =
'\0';
357 for (
i =
cpy->num_defval - 1;
i >= 0;
i--)
365 for (
i = tupdesc->
natts - 1;
i >= 0;
i--)
382 for (
i =
cpy->num_check - 1;
i >= 0;
i--)
422 for (
i = 0;
i <
dst->natts;
i++)
426 att->attnotnull =
false;
427 att->atthasdef =
false;
428 att->atthasmissing =
false;
429 att->attidentity =
'\0';
430 att->attgenerated =
'\0';
440 dst->tdrefcount = -1;
472 dstAtt->attnotnull =
false;
473 dstAtt->atthasdef =
false;
474 dstAtt->atthasmissing =
false;
475 dstAtt->attidentity =
'\0';
476 dstAtt->attgenerated =
'\0';
509 for (
i = tupdesc->
natts - 1;
i >= 0;
i--)
618 if (
attr1->attcompression !=
attr2->attcompression)
628 if (
attr1->attnotnull)
644 if (
attr1->attgenerated !=
attr2->attgenerated)
646 if (
attr1->attisdropped !=
attr2->attisdropped)
652 if (
attr1->attcollation !=
attr2->attcollation)
666 if (
constr1->has_generated_stored !=
constr2->has_generated_stored)
668 if (
constr1->has_generated_virtual !=
constr2->has_generated_virtual)
671 if (n != (
int)
constr2->num_defval)
674 for (
i = 0;
i < n;
i++)
708 if (n != (
int)
constr2->num_check)
716 for (
i = 0;
i < n;
i++)
778 if (
attr1->attcollation !=
attr2->attcollation)
782 if (
attr1->attisdropped !=
attr2->attisdropped)
862 att->atttypmod = typmod;
867 att->attnotnull =
false;
868 att->atthasdef =
false;
869 att->atthasmissing =
false;
870 att->attidentity =
'\0';
871 att->attgenerated =
'\0';
872 att->attisdropped =
false;
873 att->attislocal =
true;
874 att->attinhcount = 0;
925 att->atttypmod = typmod;
930 att->attnotnull =
false;
931 att->atthasdef =
false;
932 att->atthasmissing =
false;
933 att->attidentity =
'\0';
934 att->attgenerated =
'\0';
935 att->attisdropped =
false;
936 att->attislocal =
true;
937 att->attinhcount = 0;
952 att->attbyval =
false;
961 att->attbyval =
true;
970 att->attbyval =
true;
979 att->attbyval =
true;
988 att->attbyval =
true;
1055 forfour(l1, names, l2,
types, l3, typmods, l4, collations)
1114 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
static uint8 typalign_to_alignby(char typalign)