PostgreSQL Source Code  git master
catalog.c
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * catalog.c
4  * routines concerned with catalog naming conventions and other
5  * bits of hard-wired knowledge
6  *
7  *
8  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  *
12  * IDENTIFICATION
13  * src/backend/catalog/catalog.c
14  *
15  *-------------------------------------------------------------------------
16  */
17 
18 #include "postgres.h"
19 
20 #include <fcntl.h>
21 #include <unistd.h>
22 
23 #include "access/genam.h"
24 #include "access/htup_details.h"
25 #include "access/sysattr.h"
26 #include "access/table.h"
27 #include "access/transam.h"
28 #include "catalog/catalog.h"
29 #include "catalog/namespace.h"
31 #include "catalog/pg_authid.h"
32 #include "catalog/pg_database.h"
34 #include "catalog/pg_namespace.h"
36 #include "catalog/pg_shdepend.h"
38 #include "catalog/pg_shseclabel.h"
40 #include "catalog/pg_tablespace.h"
41 #include "catalog/pg_type.h"
42 #include "miscadmin.h"
43 #include "storage/fd.h"
44 #include "utils/fmgroids.h"
45 #include "utils/fmgrprotos.h"
46 #include "utils/rel.h"
47 #include "utils/snapmgr.h"
48 #include "utils/syscache.h"
49 
50 /*
51  * IsSystemRelation
52  * True iff the relation is either a system catalog or a toast table.
53  * See IsCatalogRelation for the exact definition of a system catalog.
54  *
55  * We treat toast tables of user relations as "system relations" for
56  * protection purposes, e.g. you can't change their schemas without
57  * special permissions. Therefore, most uses of this function are
58  * checking whether allow_system_table_mods restrictions apply.
59  * For other purposes, consider whether you shouldn't be using
60  * IsCatalogRelation instead.
61  *
62  * This function does not perform any catalog accesses.
63  * Some callers rely on that!
64  */
65 bool
67 {
68  return IsSystemClass(RelationGetRelid(relation), relation->rd_rel);
69 }
70 
71 /*
72  * IsSystemClass
73  * Like the above, but takes a Form_pg_class as argument.
74  * Used when we do not want to open the relation and have to
75  * search pg_class directly.
76  */
77 bool
79 {
80  /* IsCatalogRelationOid is a bit faster, so test that first */
81  return (IsCatalogRelationOid(relid) || IsToastClass(reltuple));
82 }
83 
84 /*
85  * IsCatalogRelation
86  * True iff the relation is a system catalog.
87  *
88  * By a system catalog, we mean one that is created during the bootstrap
89  * phase of initdb. That includes not just the catalogs per se, but
90  * also their indexes, and TOAST tables and indexes if any.
91  *
92  * This function does not perform any catalog accesses.
93  * Some callers rely on that!
94  */
95 bool
97 {
98  return IsCatalogRelationOid(RelationGetRelid(relation));
99 }
100 
101 /*
102  * IsCatalogRelationOid
103  * True iff the relation identified by this OID is a system catalog.
104  *
105  * By a system catalog, we mean one that is created during the bootstrap
106  * phase of initdb. That includes not just the catalogs per se, but
107  * also their indexes, and TOAST tables and indexes if any.
108  *
109  * This function does not perform any catalog accesses.
110  * Some callers rely on that!
111  */
112 bool
114 {
115  /*
116  * We consider a relation to be a system catalog if it has an OID that was
117  * manually assigned or assigned by genbki.pl. This includes all the
118  * defined catalogs, their indexes, and their TOAST tables and indexes.
119  *
120  * This rule excludes the relations in information_schema, which are not
121  * integral to the system and can be treated the same as user relations.
122  * (Since it's valid to drop and recreate information_schema, any rule
123  * that did not act this way would be wrong.)
124  *
125  * This test is reliable since an OID wraparound will skip this range of
126  * OIDs; see GetNewObjectId().
127  */
128  return (relid < (Oid) FirstBootstrapObjectId);
129 }
130 
131 /*
132  * IsToastRelation
133  * True iff relation is a TOAST support relation (or index).
134  *
135  * Does not perform any catalog accesses.
136  */
137 bool
139 {
140  /*
141  * What we actually check is whether the relation belongs to a pg_toast
142  * namespace. This should be equivalent because of restrictions that are
143  * enforced elsewhere against creating user relations in, or moving
144  * relations into/out of, a pg_toast namespace. Notice also that this
145  * will not say "true" for toast tables belonging to other sessions' temp
146  * tables; we expect that other mechanisms will prevent access to those.
147  */
148  return IsToastNamespace(RelationGetNamespace(relation));
149 }
150 
151 /*
152  * IsToastClass
153  * Like the above, but takes a Form_pg_class as argument.
154  * Used when we do not want to open the relation and have to
155  * search pg_class directly.
156  */
157 bool
159 {
160  Oid relnamespace = reltuple->relnamespace;
161 
162  return IsToastNamespace(relnamespace);
163 }
164 
165 /*
166  * IsCatalogNamespace
167  * True iff namespace is pg_catalog.
168  *
169  * Does not perform any catalog accesses.
170  *
171  * NOTE: the reason this isn't a macro is to avoid having to include
172  * catalog/pg_namespace.h in a lot of places.
173  */
174 bool
176 {
177  return namespaceId == PG_CATALOG_NAMESPACE;
178 }
179 
180 /*
181  * IsToastNamespace
182  * True iff namespace is pg_toast or my temporary-toast-table namespace.
183  *
184  * Does not perform any catalog accesses.
185  *
186  * Note: this will return false for temporary-toast-table namespaces belonging
187  * to other backends. Those are treated the same as other backends' regular
188  * temp table namespaces, and access is prevented where appropriate.
189  * If you need to check for those, you may be able to use isAnyTempNamespace,
190  * but beware that that does involve a catalog access.
191  */
192 bool
193 IsToastNamespace(Oid namespaceId)
194 {
195  return (namespaceId == PG_TOAST_NAMESPACE) ||
196  isTempToastNamespace(namespaceId);
197 }
198 
199 
200 /*
201  * IsReservedName
202  * True iff name starts with the pg_ prefix.
203  *
204  * For some classes of objects, the prefix pg_ is reserved for
205  * system objects only. As of 8.0, this was only true for
206  * schema and tablespace names. With 9.6, this is also true
207  * for roles.
208  */
209 bool
210 IsReservedName(const char *name)
211 {
212  /* ugly coding for speed */
213  return (name[0] == 'p' &&
214  name[1] == 'g' &&
215  name[2] == '_');
216 }
217 
218 
219 /*
220  * IsSharedRelation
221  * Given the OID of a relation, determine whether it's supposed to be
222  * shared across an entire database cluster.
223  *
224  * In older releases, this had to be hard-wired so that we could compute the
225  * locktag for a relation and lock it before examining its catalog entry.
226  * Since we now have MVCC catalog access, the race conditions that made that
227  * a hard requirement are gone, so we could look at relaxing this restriction.
228  * However, if we scanned the pg_class entry to find relisshared, and only
229  * then locked the relation, pg_class could get updated in the meantime,
230  * forcing us to scan the relation again, which would definitely be complex
231  * and might have undesirable performance consequences. Fortunately, the set
232  * of shared relations is fairly static, so a hand-maintained list of their
233  * OIDs isn't completely impractical.
234  */
235 bool
237 {
238  /* These are the shared catalogs (look for BKI_SHARED_RELATION) */
239  if (relationId == AuthIdRelationId ||
240  relationId == AuthMemRelationId ||
241  relationId == DatabaseRelationId ||
242  relationId == SharedDescriptionRelationId ||
243  relationId == SharedDependRelationId ||
244  relationId == SharedSecLabelRelationId ||
245  relationId == TableSpaceRelationId ||
246  relationId == DbRoleSettingRelationId ||
247  relationId == ReplicationOriginRelationId ||
248  relationId == SubscriptionRelationId)
249  return true;
250  /* These are their indexes */
251  if (relationId == AuthIdRolnameIndexId ||
252  relationId == AuthIdOidIndexId ||
253  relationId == AuthMemRoleMemIndexId ||
254  relationId == AuthMemMemRoleIndexId ||
255  relationId == DatabaseNameIndexId ||
256  relationId == DatabaseOidIndexId ||
257  relationId == SharedDescriptionObjIndexId ||
258  relationId == SharedDependDependerIndexId ||
259  relationId == SharedDependReferenceIndexId ||
260  relationId == SharedSecLabelObjectIndexId ||
261  relationId == TablespaceOidIndexId ||
262  relationId == TablespaceNameIndexId ||
263  relationId == DbRoleSettingDatidRolidIndexId ||
264  relationId == ReplicationOriginIdentIndex ||
265  relationId == ReplicationOriginNameIndex ||
266  relationId == SubscriptionObjectIndexId ||
267  relationId == SubscriptionNameIndexId)
268  return true;
269  /* These are their toast tables and toast indexes */
270  if (relationId == PgAuthidToastTable ||
271  relationId == PgAuthidToastIndex ||
272  relationId == PgDatabaseToastTable ||
273  relationId == PgDatabaseToastIndex ||
274  relationId == PgDbRoleSettingToastTable ||
275  relationId == PgDbRoleSettingToastIndex ||
276  relationId == PgReplicationOriginToastTable ||
277  relationId == PgReplicationOriginToastIndex ||
278  relationId == PgShdescriptionToastTable ||
279  relationId == PgShdescriptionToastIndex ||
280  relationId == PgShseclabelToastTable ||
281  relationId == PgShseclabelToastIndex ||
282  relationId == PgSubscriptionToastTable ||
283  relationId == PgSubscriptionToastIndex ||
284  relationId == PgTablespaceToastTable ||
285  relationId == PgTablespaceToastIndex)
286  return true;
287  return false;
288 }
289 
290 
291 /*
292  * GetNewOidWithIndex
293  * Generate a new OID that is unique within the system relation.
294  *
295  * Since the OID is not immediately inserted into the table, there is a
296  * race condition here; but a problem could occur only if someone else
297  * managed to cycle through 2^32 OIDs and generate the same OID before we
298  * finish inserting our row. This seems unlikely to be a problem. Note
299  * that if we had to *commit* the row to end the race condition, the risk
300  * would be rather higher; therefore we use SnapshotAny in the test, so that
301  * we will see uncommitted rows. (We used to use SnapshotDirty, but that has
302  * the disadvantage that it ignores recently-deleted rows, creating a risk
303  * of transient conflicts for as long as our own MVCC snapshots think a
304  * recently-deleted row is live. The risk is far higher when selecting TOAST
305  * OIDs, because SnapshotToast considers dead rows as active indefinitely.)
306  *
307  * Note that we are effectively assuming that the table has a relatively small
308  * number of entries (much less than 2^32) and there aren't very long runs of
309  * consecutive existing OIDs. This is a mostly reasonable assumption for
310  * system catalogs.
311  *
312  * Caller must have a suitable lock on the relation.
313  */
314 Oid
315 GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
316 {
317  Oid newOid;
318  SysScanDesc scan;
320  bool collides;
321 
322  /* Only system relations are supported */
323  Assert(IsSystemRelation(relation));
324 
325  /* In bootstrap mode, we don't have any indexes to use */
327  return GetNewObjectId();
328 
329  /*
330  * We should never be asked to generate a new pg_type OID during
331  * pg_upgrade; doing so would risk collisions with the OIDs it wants to
332  * assign. Hitting this assert means there's some path where we failed to
333  * ensure that a type OID is determined by commands in the dump script.
334  */
335  Assert(!IsBinaryUpgrade || RelationGetRelid(relation) != TypeRelationId);
336 
337  /* Generate new OIDs until we find one not in the table */
338  do
339  {
341 
342  newOid = GetNewObjectId();
343 
344  ScanKeyInit(&key,
345  oidcolumn,
346  BTEqualStrategyNumber, F_OIDEQ,
347  ObjectIdGetDatum(newOid));
348 
349  /* see notes above about using SnapshotAny */
350  scan = systable_beginscan(relation, indexId, true,
351  SnapshotAny, 1, &key);
352 
353  collides = HeapTupleIsValid(systable_getnext(scan));
354 
355  systable_endscan(scan);
356  } while (collides);
357 
358  return newOid;
359 }
360 
361 /*
362  * GetNewRelFileNode
363  * Generate a new relfilenode number that is unique within the
364  * database of the given tablespace.
365  *
366  * If the relfilenode will also be used as the relation's OID, pass the
367  * opened pg_class catalog, and this routine will guarantee that the result
368  * is also an unused OID within pg_class. If the result is to be used only
369  * as a relfilenode for an existing relation, pass NULL for pg_class.
370  *
371  * As with GetNewOidWithIndex(), there is some theoretical risk of a race
372  * condition, but it doesn't seem worth worrying about.
373  *
374  * Note: we don't support using this in bootstrap mode. All relations
375  * created by bootstrap have preassigned OIDs, so there's no need.
376  */
377 Oid
378 GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
379 {
380  RelFileNodeBackend rnode;
381  char *rpath;
382  bool collides;
383  BackendId backend;
384 
385  /*
386  * If we ever get here during pg_upgrade, there's something wrong; all
387  * relfilenode assignments during a binary-upgrade run should be
388  * determined by commands in the dump script.
389  */
391 
392  switch (relpersistence)
393  {
394  case RELPERSISTENCE_TEMP:
395  backend = BackendIdForTempRelations();
396  break;
397  case RELPERSISTENCE_UNLOGGED:
398  case RELPERSISTENCE_PERMANENT:
399  backend = InvalidBackendId;
400  break;
401  default:
402  elog(ERROR, "invalid relpersistence: %c", relpersistence);
403  return InvalidOid; /* placate compiler */
404  }
405 
406  /* This logic should match RelationInitPhysicalAddr */
407  rnode.node.spcNode = reltablespace ? reltablespace : MyDatabaseTableSpace;
408  rnode.node.dbNode = (rnode.node.spcNode == GLOBALTABLESPACE_OID) ? InvalidOid : MyDatabaseId;
409 
410  /*
411  * The relpath will vary based on the backend ID, so we must initialize
412  * that properly here to make sure that any collisions based on filename
413  * are properly detected.
414  */
415  rnode.backend = backend;
416 
417  do
418  {
420 
421  /* Generate the OID */
422  if (pg_class)
424  Anum_pg_class_oid);
425  else
426  rnode.node.relNode = GetNewObjectId();
427 
428  /* Check for existing file of same name */
429  rpath = relpath(rnode, MAIN_FORKNUM);
430 
431  if (access(rpath, F_OK) == 0)
432  {
433  /* definite collision */
434  collides = true;
435  }
436  else
437  {
438  /*
439  * Here we have a little bit of a dilemma: if errno is something
440  * other than ENOENT, should we declare a collision and loop? In
441  * practice it seems best to go ahead regardless of the errno. If
442  * there is a colliding file we will get an smgr failure when we
443  * attempt to create the new relation file.
444  */
445  collides = false;
446  }
447 
448  pfree(rpath);
449  } while (collides);
450 
451  return rnode.node.relNode;
452 }
453 
454 /*
455  * SQL callable interface for GetNewOidWithIndex(). Outside of initdb's
456  * direct insertions into catalog tables, and recovering from corruption, this
457  * should rarely be needed.
458  *
459  * Function is intentionally not documented in the user facing docs.
460  */
461 Datum
463 {
464  Oid reloid = PG_GETARG_OID(0);
466  Oid idxoid = PG_GETARG_OID(2);
467  Relation rel;
468  Relation idx;
469  HeapTuple atttuple;
470  Form_pg_attribute attform;
471  AttrNumber attno;
472  Oid newoid;
473 
474  /*
475  * As this function is not intended to be used during normal running, and
476  * only supports system catalogs (which require superuser permissions to
477  * modify), just checking for superuser ought to not obstruct valid
478  * usecases.
479  */
480  if (!superuser())
481  ereport(ERROR,
482  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
483  errmsg("must be superuser to call pg_nextoid()")));
484 
485  rel = table_open(reloid, RowExclusiveLock);
486  idx = index_open(idxoid, RowExclusiveLock);
487 
488  if (!IsSystemRelation(rel))
489  ereport(ERROR,
490  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
491  errmsg("pg_nextoid() can only be used on system catalogs")));
492 
493  if (idx->rd_index->indrelid != RelationGetRelid(rel))
494  ereport(ERROR,
495  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
496  errmsg("index \"%s\" does not belong to table \"%s\"",
498  RelationGetRelationName(rel))));
499 
500  atttuple = SearchSysCacheAttName(reloid, NameStr(*attname));
501  if (!HeapTupleIsValid(atttuple))
502  ereport(ERROR,
503  (errcode(ERRCODE_UNDEFINED_COLUMN),
504  errmsg("column \"%s\" of relation \"%s\" does not exist",
505  NameStr(*attname), RelationGetRelationName(rel))));
506 
507  attform = ((Form_pg_attribute) GETSTRUCT(atttuple));
508  attno = attform->attnum;
509 
510  if (attform->atttypid != OIDOID)
511  ereport(ERROR,
512  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
513  errmsg("column \"%s\" is not of type oid",
514  NameStr(*attname))));
515 
517  idx->rd_index->indkey.values[0] != attno)
518  ereport(ERROR,
519  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
520  errmsg("index \"%s\" is not the index for column \"%s\"",
522  NameStr(*attname))));
523 
524  newoid = GetNewOidWithIndex(rel, idxoid, attno);
525 
526  ReleaseSysCache(atttuple);
529 
530  return newoid;
531 }
#define PgDatabaseToastTable
Definition: pg_database.h:84
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
Definition: catalog.c:315
bool IsToastRelation(Relation relation)
Definition: catalog.c:138
bool IsCatalogRelation(Relation relation)
Definition: catalog.c:96
void table_close(Relation relation, LOCKMODE lockmode)
Definition: table.c:167
void systable_endscan(SysScanDesc sysscan)
Definition: genam.c:569
#define GETSTRUCT(TUP)
Definition: htup_details.h:655
bool IsSystemRelation(Relation relation)
Definition: catalog.c:66
#define TablespaceNameIndexId
Definition: pg_tablespace.h:55
#define PgSubscriptionToastIndex
int errcode(int sqlerrcode)
Definition: elog.c:691
bool superuser(void)
Definition: superuser.c:46
#define SharedDescriptionObjIndexId
Datum idx(PG_FUNCTION_ARGS)
Definition: _int_op.c:259
#define DatabaseNameIndexId
Definition: pg_database.h:88
#define PgShseclabelToastTable
Definition: pg_shseclabel.h:42
#define ReplicationOriginIdentIndex
bool IsToastNamespace(Oid namespaceId)
Definition: catalog.c:193
Form_pg_class rd_rel
Definition: rel.h:110
unsigned int Oid
Definition: postgres_ext.h:31
bool IsReservedName(const char *name)
Definition: catalog.c:210
#define ClassOidIndexId
Definition: pg_class.h:156
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
Definition: genam.c:357
bool IsBinaryUpgrade
Definition: globals.c:110
Oid MyDatabaseTableSpace
Definition: globals.c:87
#define SharedSecLabelObjectIndexId
Definition: pg_shseclabel.h:46
#define PgAuthidToastIndex
Definition: pg_authid.h:60
bool IsSystemClass(Oid relid, Form_pg_class reltuple)
Definition: catalog.c:78
#define PgShseclabelToastIndex
Definition: pg_shseclabel.h:43
bool IsCatalogRelationOid(Oid relid)
Definition: catalog.c:113
#define AuthMemMemRoleIndexId
Oid GetNewObjectId(void)
Definition: varsup.c:528
Form_pg_index rd_index
Definition: rel.h:175
HeapTuple systable_getnext(SysScanDesc sysscan)
Definition: genam.c:476
void pfree(void *pointer)
Definition: mcxt.c:1057
bool IsToastClass(Form_pg_class reltuple)
Definition: catalog.c:158
#define PgDatabaseToastIndex
Definition: pg_database.h:85
#define ObjectIdGetDatum(X)
Definition: postgres.h:507
#define ERROR
Definition: elog.h:43
NameData attname
Definition: pg_attribute.h:40
#define SharedDependReferenceIndexId
Definition: pg_shdepend.h:75
#define ReplicationOriginNameIndex
#define PgReplicationOriginToastIndex
Definition: c.h:671
#define BackendIdForTempRelations()
Definition: backendid.h:34
#define PG_GETARG_OID(n)
Definition: fmgr.h:275
#define SubscriptionObjectIndexId
#define PgShdescriptionToastTable
#define RowExclusiveLock
Definition: lockdefs.h:38
#define PgAuthidToastTable
Definition: pg_authid.h:59
#define RelationGetRelationName(relation)
Definition: rel.h:491
FormData_pg_attribute * Form_pg_attribute
Definition: pg_attribute.h:193
#define FirstBootstrapObjectId
Definition: transam.h:189
#define IndexRelationGetNumberOfKeyAttributes(relation)
Definition: rel.h:476
#define DatabaseOidIndexId
Definition: pg_database.h:90
bool isTempToastNamespace(Oid namespaceId)
Definition: namespace.c:3168
#define PgDbRoleSettingToastTable
#define PgSubscriptionToastTable
#define InvalidBackendId
Definition: backendid.h:23
#define TablespaceOidIndexId
Definition: pg_tablespace.h:53
uintptr_t Datum
Definition: postgres.h:367
void ReleaseSysCache(HeapTuple tuple)
Definition: syscache.c:1163
int BackendId
Definition: backendid.h:21
Oid MyDatabaseId
Definition: globals.c:85
bool IsSharedRelation(Oid relationId)
Definition: catalog.c:236
#define PgReplicationOriginToastTable
#define InvalidOid
Definition: postgres_ext.h:36
#define ereport(elevel,...)
Definition: elog.h:155
RelFileNode node
Definition: relfilenode.h:74
#define HeapTupleIsValid(tuple)
Definition: htup.h:78
#define Assert(condition)
Definition: c.h:800
BackendId backend
Definition: relfilenode.h:75
Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
Definition: catalog.c:378
#define DbRoleSettingDatidRolidIndexId
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
Definition: syscache.c:1256
#define PgTablespaceToastTable
Definition: pg_tablespace.h:49
const char * name
Definition: encode.c:561
#define AuthIdOidIndexId
Definition: pg_authid.h:65
#define SnapshotAny
Definition: snapmgr.h:68
#define PgTablespaceToastIndex
Definition: pg_tablespace.h:50
void index_close(Relation relation, LOCKMODE lockmode)
Definition: indexam.c:158
bool IsCatalogNamespace(Oid namespaceId)
Definition: catalog.c:175
#define IsBootstrapProcessingMode()
Definition: miscadmin.h:393
FormData_pg_class * Form_pg_class
Definition: pg_class.h:153
int errmsg(const char *fmt,...)
Definition: elog.c:902
#define elog(elevel,...)
Definition: elog.h:228
#define relpath(rnode, forknum)
Definition: relpath.h:87
#define NameStr(name)
Definition: c.h:677
#define PgShdescriptionToastIndex
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
Definition: scankey.c:76
#define PG_FUNCTION_ARGS
Definition: fmgr.h:193
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:99
#define PgDbRoleSettingToastIndex
Datum pg_nextoid(PG_FUNCTION_ARGS)
Definition: catalog.c:462
Relation table_open(Oid relationId, LOCKMODE lockmode)
Definition: table.c:39
#define AuthIdRolnameIndexId
Definition: pg_authid.h:63
int16 AttrNumber
Definition: attnum.h:21
#define SharedDependDependerIndexId
Definition: pg_shdepend.h:73
#define RelationGetRelid(relation)
Definition: rel.h:457
#define AuthMemRoleMemIndexId
Relation index_open(Oid relationId, LOCKMODE lockmode)
Definition: indexam.c:132
#define BTEqualStrategyNumber
Definition: stratnum.h:31
#define PG_GETARG_NAME(n)
Definition: fmgr.h:278
#define SubscriptionNameIndexId
#define RelationGetNamespace(relation)
Definition: rel.h:498