github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/sqlbase/constants.go (about)

     1  // Copyright 2017 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  package sqlbase
    12  
    13  import (
    14  	"math"
    15  
    16  	"github.com/cockroachdb/cockroach/pkg/sql/sessiondata"
    17  )
    18  
    19  // DefaultSearchPath is the search path used by virgin sessions.
    20  var DefaultSearchPath = sessiondata.MakeSearchPath([]string{"public"})
    21  
    22  // AdminRole is the default (and non-droppable) role with superuser privileges.
    23  var AdminRole = "admin"
    24  
    25  // PublicRole is the special "public" pseudo-role.
    26  // All users are implicit members of "public". The role cannot be created,
    27  // dropped, assigned to another role, and is generally not listed.
    28  // It can be granted privileges, implicitly granting them to all users (current and future).
    29  var PublicRole = "public"
    30  
    31  // ReportableAppNamePrefix indicates that the application name can be
    32  // reported in telemetry without scrubbing. (Note this only applies to
    33  // the application name itself. Query data is still scrubbed as
    34  // usual.)
    35  const ReportableAppNamePrefix = "$ "
    36  
    37  // InternalAppNamePrefix indicates that the application name identifies
    38  // an internal task / query / job to CockroachDB. Different application
    39  // names are used to classify queries in different categories.
    40  const InternalAppNamePrefix = ReportableAppNamePrefix + "internal"
    41  
    42  // DelegatedAppNamePrefix is added to a regular client application
    43  // name for SQL queries that are ran internally on behalf of other SQL
    44  // queries inside that application. This is not the same as
    45  // RepotableAppNamePrefix; in particular the application name with
    46  // DelegatedAppNamePrefix should be scrubbed in reporting.
    47  const DelegatedAppNamePrefix = "$$ "
    48  
    49  // Oid for virtual database and table.
    50  const (
    51  	CrdbInternalID = math.MaxUint32 - iota
    52  	CrdbInternalBackwardDependenciesTableID
    53  	CrdbInternalBuildInfoTableID
    54  	CrdbInternalBuiltinFunctionsTableID
    55  	CrdbInternalClusterQueriesTableID
    56  	CrdbInternalClusterTransactionsTableID
    57  	CrdbInternalClusterSessionsTableID
    58  	CrdbInternalClusterSettingsTableID
    59  	CrdbInternalCreateStmtsTableID
    60  	CrdbInternalCreateTypeStmtsTableID
    61  	CrdbInternalFeatureUsageID
    62  	CrdbInternalForwardDependenciesTableID
    63  	CrdbInternalGossipNodesTableID
    64  	CrdbInternalGossipAlertsTableID
    65  	CrdbInternalGossipLivenessTableID
    66  	CrdbInternalGossipNetworkTableID
    67  	CrdbInternalIndexColumnsTableID
    68  	CrdbInternalJobsTableID
    69  	CrdbInternalKVNodeStatusTableID
    70  	CrdbInternalKVStoreStatusTableID
    71  	CrdbInternalLeasesTableID
    72  	CrdbInternalLocalQueriesTableID
    73  	CrdbInternalLocalTransactionsTableID
    74  	CrdbInternalLocalSessionsTableID
    75  	CrdbInternalLocalMetricsTableID
    76  	CrdbInternalPartitionsTableID
    77  	CrdbInternalPredefinedCommentsTableID
    78  	CrdbInternalRangesNoLeasesTableID
    79  	CrdbInternalRangesViewID
    80  	CrdbInternalRuntimeInfoTableID
    81  	CrdbInternalSchemaChangesTableID
    82  	CrdbInternalSessionTraceTableID
    83  	CrdbInternalSessionVariablesTableID
    84  	CrdbInternalStmtStatsTableID
    85  	CrdbInternalTableColumnsTableID
    86  	CrdbInternalTableIndexesTableID
    87  	CrdbInternalTablesTableID
    88  	CrdbInternalTxnStatsTableID
    89  	CrdbInternalZonesTableID
    90  	InformationSchemaID
    91  	InformationSchemaAdministrableRoleAuthorizationsID
    92  	InformationSchemaApplicableRolesID
    93  	InformationSchemaCheckConstraints
    94  	InformationSchemaColumnPrivilegesID
    95  	InformationSchemaColumnsTableID
    96  	InformationSchemaConstraintColumnUsageTableID
    97  	InformationSchemaEnabledRolesID
    98  	InformationSchemaKeyColumnUsageTableID
    99  	InformationSchemaParametersTableID
   100  	InformationSchemaReferentialConstraintsTableID
   101  	InformationSchemaRoleTableGrantsID
   102  	InformationSchemaRoutineTableID
   103  	InformationSchemaSchemataTableID
   104  	InformationSchemaSchemataTablePrivilegesID
   105  	InformationSchemaSequencesID
   106  	InformationSchemaStatisticsTableID
   107  	InformationSchemaTableConstraintTableID
   108  	InformationSchemaTablePrivilegesID
   109  	InformationSchemaTablesTableID
   110  	InformationSchemaViewsTableID
   111  	InformationSchemaUserPrivilegesID
   112  	PgCatalogID
   113  	PgCatalogAggregateTableID
   114  	PgCatalogAmTableID
   115  	PgCatalogAttrDefTableID
   116  	PgCatalogAttributeTableID
   117  	PgCatalogAuthIDTableID
   118  	PgCatalogAuthMembersTableID
   119  	PgCatalogAvailableExtensionsTableID
   120  	PgCatalogCastTableID
   121  	PgCatalogClassTableID
   122  	PgCatalogCollationTableID
   123  	PgCatalogConstraintTableID
   124  	PgCatalogConversionTableID
   125  	PgCatalogDatabaseTableID
   126  	PgCatalogDefaultACLTableID
   127  	PgCatalogDependTableID
   128  	PgCatalogDescriptionTableID
   129  	PgCatalogSharedDescriptionTableID
   130  	PgCatalogEnumTableID
   131  	PgCatalogEventTriggerTableID
   132  	PgCatalogExtensionTableID
   133  	PgCatalogForeignDataWrapperTableID
   134  	PgCatalogForeignServerTableID
   135  	PgCatalogForeignTableTableID
   136  	PgCatalogIndexTableID
   137  	PgCatalogIndexesTableID
   138  	PgCatalogInheritsTableID
   139  	PgCatalogLanguageTableID
   140  	PgCatalogLocksTableID
   141  	PgCatalogMatViewsTableID
   142  	PgCatalogNamespaceTableID
   143  	PgCatalogOperatorTableID
   144  	PgCatalogPreparedStatementsTableID
   145  	PgCatalogPreparedXactsTableID
   146  	PgCatalogProcTableID
   147  	PgCatalogRangeTableID
   148  	PgCatalogRewriteTableID
   149  	PgCatalogRolesTableID
   150  	PgCatalogSecLabelsTableID
   151  	PgCatalogSequencesTableID
   152  	PgCatalogSettingsTableID
   153  	PgCatalogShdependTableID
   154  	PgCatalogUserTableID
   155  	PgCatalogUserMappingTableID
   156  	PgCatalogTablesTableID
   157  	PgCatalogTablespaceTableID
   158  	PgCatalogTriggerTableID
   159  	PgCatalogTypeTableID
   160  	PgCatalogViewsTableID
   161  	PgCatalogStatActivityTableID
   162  	PgCatalogSecurityLabelTableID
   163  	PgCatalogSharedSecurityLabelTableID
   164  	PgExtensionSchemaID
   165  	PgExtensionGeographyColumnsTableID
   166  	PgExtensionGeometryColumnsTableID
   167  	PgExtensionSpatialRefSysTableID
   168  	MinVirtualID = PgExtensionSpatialRefSysTableID
   169  )