LCOV - code coverage report
Current view: top level - src/backend/catalog - catalog.c (source / functions) Hit Total Coverage
Test: PostgreSQL 13devel Lines: 122 130 93.8 %
Date: 2019-11-22 07:06:56 Functions: 13 13 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13