now I found 3 possible types of structure in the source code:
-
in the excution plan node
typedef struct List { NodeTag type; /* T_List, T_IntList, T_OidList, or T_XidList */ int length; /* number of elements currently present */ int max_length; /* allocated length of elements[] */ ListCell *elements; /* re-allocatable array of cells */ /* We may allocate some cells along with the List header: */ ListCell initial_elements[FLEXIBLE_ARRAY_MEMBER]; /* If elements == initial_elements, it's not a separate allocation */ } List;
-
in the scan node,Here are the contents of a relation cache entry.
/*
* Here are the contents of a relation cache entry.
*/
typedef struct RelationData
{
RelFileLocator rd_locator; /* relation physical identifier */
SMgrRelation rd_smgr; /* cached file handle, or NULL */
int rd_refcnt; /* reference count */
ProcNumber rd_backend; /* owning backend's proc number, if temp rel */
bool rd_islocaltemp; /* rel is a temp rel of this session */
bool rd_isnailed; /* rel is nailed in cache */
bool rd_isvalid; /* relcache entry is valid */
bool rd_indexvalid; /* is rd_indexlist valid? (also rd_pkindex and
* rd_replidindex) */
3.HeapTupleData is an in-memory data structure that points to a tuple.There are several ways in which this data structure is used:
typedef struct HeapTupleData
{
uint32 t_len; /* length of *t_data */
ItemPointerData t_self; /* SelfItemPointer */
Oid t_tableOid; /* table the tuple came from */
#define FIELDNO_HEAPTUPLEDATA_DATA 3
HeapTupleHeader t_data; /* -> tuple header and data */
} HeapTupleData;
Is it one of the above three, or is it some other structure?
New contributor
mumu Hu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.