69{
80
82
83
86
87 if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
89 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
90 errmsg(
"\"%s\" is a partitioned table",
92 errdetail(
"Partitioned tables do not contain rows.")));
93 else if (rel->rd_rel->relkind != RELKIND_RELATION)
95 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
96 errmsg(
"\"%s\" is not a table",
98 else if (rel->rd_rel->relam != HEAP_TABLE_AM_OID)
100 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
101 errmsg(
"only heap AM is supported")));
102
103
104
105
106
111
115
116
119
121
123
125 {
129
130
132
135 hscan->rs_cbuf);
137 infomask = tuple->t_data->t_infomask;
138
139
140
141
143 {
146
150 {
152 int nmembers;
153 bool first = true;
154 bool allow_old;
155
157
160 false);
161 if (nmembers == -1)
162 {
166 }
167 else
168 {
170
174
178
179 for (
j = 0;
j < nmembers;
j++)
180 {
182
183 if (!first)
184 {
188 }
191 switch (members[
j].status)
192 {
195 break;
198 break;
201 break;
204 break;
207 break;
210 break;
211 }
216
217 first = false;
218 }
219
223 }
224 }
225 else
226 {
228
231
234 {
240 {
243 else
245 }
246 else
247
249 "{transient upgrade status}");
250 }
251 else
252 {
255 else
257 }
258
262 }
263
265
266
269 }
270 else
271 {
273 }
274 }
275
279}
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)
static bool HEAP_XMAX_IS_SHR_LOCKED(int16 infomask)
#define HEAP_KEYS_UPDATED
#define HEAP_XMAX_LOCK_ONLY
static TransactionId HeapTupleHeaderGetRawXmax(const HeapTupleHeaderData *tup)
static bool HEAP_XMAX_IS_KEYSHR_LOCKED(int16 infomask)
#define HEAP_XMAX_IS_MULTI
static bool HEAP_LOCKED_UPGRADED(uint16 infomask)
static bool HEAP_XMAX_IS_EXCL_LOCKED(int16 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)