66{
77
79
80
83
84 if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
86 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
87 errmsg(
"\"%s\" is a partitioned table",
89 errdetail(
"Partitioned tables do not contain rows.")));
90 else if (rel->rd_rel->relkind != RELKIND_RELATION)
92 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
93 errmsg(
"\"%s\" is not a table",
95 else if (rel->rd_rel->relam != HEAP_TABLE_AM_OID)
97 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
98 errmsg(
"only heap AM is supported")));
99
100
101
102
103
108
112
113
116
118
120
122 {
126
127
129
132 hscan->rs_cbuf);
134 infomask = tuple->t_data->t_infomask;
135
136
137
138
140 {
143
147 {
149 int nmembers;
150 bool first = true;
151 bool allow_old;
152
154
157 false);
158 if (nmembers == -1)
159 {
163 }
164 else
165 {
167
171
175
176 for (
j = 0;
j < nmembers;
j++)
177 {
179
180 if (!first)
181 {
185 }
188 switch (members[
j].status)
189 {
192 break;
195 break;
198 break;
201 break;
204 break;
207 break;
208 }
213
214 first = false;
215 }
216
220 }
221 }
222 else
223 {
225
228
231 {
237 {
240 else
242 }
243 else
244
246 "{transient upgrade status}");
247 }
248 else
249 {
252 else
254 }
255
259 }
260
262
263
266 }
267 else
268 {
270 }
271 }
272
276}
bool has_privs_of_role(Oid member, Oid role)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult pg_class_aclcheck(Oid table_oid, Oid roleid, AclMode mode)
static Datum values[MAXATTR]
void LockBuffer(Buffer buffer, int mode)
#define BUFFER_LOCK_UNLOCK
#define BUFFER_LOCK_SHARE
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
AttInMetadata * TupleDescGetAttInMetadata(TupleDesc tupdesc)
#define PG_GETARG_TEXT_PP(n)
#define DirectFunctionCall1(func, arg1)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction)
struct HeapScanDescData * HeapScanDesc
TM_Result HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, Buffer buffer)
#define HEAP_XMAX_IS_EXCL_LOCKED(infomask)
#define HEAP_XMAX_IS_KEYSHR_LOCKED(infomask)
#define HEAP_KEYS_UPDATED
#define HEAP_XMAX_LOCK_ONLY
#define HEAP_XMAX_IS_MULTI
#define HeapTupleHeaderGetRawXmax(tup)
#define HEAP_XMAX_IS_SHR_LOCKED(infomask)
#define HEAP_LOCKED_UPGRADED(infomask)
char * pstrdup(const char *in)
int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, bool from_pgupgrade, bool isLockOnly)
@ MultiXactStatusForShare
@ MultiXactStatusForNoKeyUpdate
@ MultiXactStatusNoKeyUpdate
@ MultiXactStatusForUpdate
@ MultiXactStatusForKeyShare
RangeVar * makeRangeVarFromNameList(const List *names)
ObjectType get_relkind_objtype(char relkind)
static Datum PointerGetDatum(const void *X)
int BackendXidGetPid(TransactionId xid)
#define RelationGetRelid(relation)
#define RelationGetRelationName(relation)
Snapshot GetActiveSnapshot(void)
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
Tuplestorestate * setResult
void table_close(Relation relation, LOCKMODE lockmode)
static TableScanDesc table_beginscan(Relation rel, Snapshot snapshot, int nkeys, struct ScanKeyData *key)
static void table_endscan(TableScanDesc scan)
Datum tidout(PG_FUNCTION_ARGS)
void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
List * textToQualifiedNameList(text *textval)
CommandId GetCurrentCommandId(bool used)