Header And Logo

PostgreSQL
| The world's most advanced open source database.

Defines | Typedefs | Functions | Variables

pg_class.h File Reference

#include "catalog/genbki.h"
Include dependency graph for pg_class.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define RelationRelationId   1259
#define RelationRelation_Rowtype_Id   83
#define CLASS_TUPLE_SIZE   (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId))
#define Natts_pg_class   28
#define Anum_pg_class_relname   1
#define Anum_pg_class_relnamespace   2
#define Anum_pg_class_reltype   3
#define Anum_pg_class_reloftype   4
#define Anum_pg_class_relowner   5
#define Anum_pg_class_relam   6
#define Anum_pg_class_relfilenode   7
#define Anum_pg_class_reltablespace   8
#define Anum_pg_class_relpages   9
#define Anum_pg_class_reltuples   10
#define Anum_pg_class_relallvisible   11
#define Anum_pg_class_reltoastrelid   12
#define Anum_pg_class_reltoastidxid   13
#define Anum_pg_class_relhasindex   14
#define Anum_pg_class_relisshared   15
#define Anum_pg_class_relpersistence   16
#define Anum_pg_class_relkind   17
#define Anum_pg_class_relnatts   18
#define Anum_pg_class_relchecks   19
#define Anum_pg_class_relhasoids   20
#define Anum_pg_class_relhaspkey   21
#define Anum_pg_class_relhasrules   22
#define Anum_pg_class_relhastriggers   23
#define Anum_pg_class_relhassubclass   24
#define Anum_pg_class_relfrozenxid   25
#define Anum_pg_class_relminmxid   26
#define Anum_pg_class_relacl   27
#define Anum_pg_class_reloptions   28
#define RELKIND_RELATION   'r'
#define RELKIND_INDEX   'i'
#define RELKIND_SEQUENCE   'S'
#define RELKIND_TOASTVALUE   't'
#define RELKIND_VIEW   'v'
#define RELKIND_COMPOSITE_TYPE   'c'
#define RELKIND_FOREIGN_TABLE   'f'
#define RELKIND_MATVIEW   'm'
#define RELPERSISTENCE_PERMANENT   'p'
#define RELPERSISTENCE_UNLOGGED   'u'
#define RELPERSISTENCE_TEMP   't'

Typedefs

typedef FormData_pg_classForm_pg_class

Functions

 CATALOG (pg_class, 1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
 DATA (insert OID=1247(pg_typePGNSP 71 0 PGUID 0 0 0 0 0 0 0 0 f f p r 30 0 t f f f f 3 1 _null_ _null_))
 DESCR ("")

Variables

 FormData_pg_class

Define Documentation

#define Anum_pg_class_relacl   27
#define Anum_pg_class_relallvisible   11

Definition at line 107 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relam   6

Definition at line 102 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relchecks   19

Definition at line 115 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relfilenode   7

Definition at line 103 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relfrozenxid   25

Definition at line 121 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhasindex   14

Definition at line 110 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhasoids   20

Definition at line 116 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhaspkey   21

Definition at line 117 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhasrules   22

Definition at line 118 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhassubclass   24

Definition at line 120 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relhastriggers   23

Definition at line 119 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relisshared   15

Definition at line 111 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relkind   17

Definition at line 113 of file pg_class.h.

Referenced by do_autovacuum(), getRelationsInNamespace(), and InsertPgClassTuple().

#define Anum_pg_class_relminmxid   26

Definition at line 122 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relname   1

Definition at line 97 of file pg_class.h.

Referenced by InsertPgClassTuple(), and regclassin().

#define Anum_pg_class_relnamespace   2

Definition at line 98 of file pg_class.h.

Referenced by getRelationsInNamespace(), and InsertPgClassTuple().

#define Anum_pg_class_relnatts   18

Definition at line 114 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reloftype   4

Definition at line 100 of file pg_class.h.

Referenced by find_typed_table_dependencies(), and InsertPgClassTuple().

#define Anum_pg_class_reloptions   28
#define Anum_pg_class_relowner   5

Definition at line 101 of file pg_class.h.

Referenced by ATExecChangeOwner(), and InsertPgClassTuple().

#define Anum_pg_class_relpages   9

Definition at line 105 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_relpersistence   16

Definition at line 112 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reltablespace   8

Definition at line 104 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reltoastidxid   13

Definition at line 109 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reltoastrelid   12

Definition at line 108 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reltuples   10

Definition at line 106 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define Anum_pg_class_reltype   3

Definition at line 99 of file pg_class.h.

Referenced by InsertPgClassTuple().

#define CLASS_TUPLE_SIZE   (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId))
#define Natts_pg_class   28

Definition at line 96 of file pg_class.h.

Referenced by GetPgClassDescriptor(), and RelationCacheInitializePhase3().

#define RelationRelation_Rowtype_Id   83

Definition at line 30 of file pg_class.h.

Referenced by RelationCacheInitializePhase3().

#define RelationRelationId   1259

Definition at line 29 of file pg_class.h.

Referenced by AcquireDeletionLock(), AlterRelationNamespaceInternal(), AlterSeqNamespaces(), AlterSequence(), AlterTableNamespace(), AlterTableNamespaceInternal(), AlterTypeNamespaceInternal(), ATExecAddColumn(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), CacheInvalidateHeapTuple(), change_owner_recurse_to_sequences(), CheckSetNamespace(), create_toast_table(), CreateTrigger(), DefineIndex(), DefineQueryRewrite(), DeleteRelationTuple(), do_autovacuum(), drop_parent_dependency(), exec_object_restorecon(), ExecAlterExtensionContentsStmt(), ExecGrant_Attribute(), ExecGrant_Relation(), find_composite_type_dependencies(), find_typed_table_dependencies(), finish_heap_swap(), get_constraint_index(), get_index_constraint(), get_object_address(), get_rel_oids(), get_rels_with_domain(), getObjectClass(), getOwnedSequences(), getRelationsInNamespace(), heap_create_with_catalog(), index_constraint_create(), index_create(), index_update_stats(), markSequenceUnowned(), pg_extension_config_dump(), pg_get_serial_sequence(), pgstat_vacuum_stat(), recordDependencyOnSingleRelExpr(), regclassin(), ReindexDatabase(), RelationBuildLocalRelation(), RelationCacheInitializePhase3(), RelationCacheInvalidate(), RelationSetNewRelfilenode(), ReleaseDeletionLock(), RemoveConstraintById(), RemoveRoleFromObjectACL(), renameatt_internal(), RenameRelationInternal(), ScanPgRelation(), sepgsql_attribute_post_create(), sepgsql_object_access(), sepgsql_object_relabel(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_restorecon(), sequenceIsOwned(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), shdepReassignOwned(), swap_relation_files(), transformTableLikeClause(), vac_update_datfrozenxid(), and vac_update_relstats().

#define RELKIND_COMPOSITE_TYPE   'c'
#define RELKIND_FOREIGN_TABLE   'f'
#define RELKIND_INDEX   'i'
#define RELKIND_MATVIEW   'm'

Definition at line 156 of file pg_class.h.

Referenced by AddNewRelationTuple(), AlterTableNamespaceInternal(), analyze_rel(), ATExecChangeOwner(), ATExecSetRelOptions(), ATPrepSetStatistics(), ATRewriteCatalogs(), ATSimplePermissions(), BeginCopyTo(), BootstrapToastTable(), build_row_from_class(), buildMatViewRefreshDependencies(), CheckValidResultRel(), CheckValidRowMarkRel(), cluster_rel(), CommentObject(), copy_heap_data(), CopyFrom(), DefineIndex(), DefineQueryRewrite(), do_autovacuum(), dumpTableSchema(), estimate_rel_size(), ExecRefreshMatView(), ExecSecLabelStmt(), expand_table_name_patterns(), extract_autovac_opts(), extractRelOptions(), find_composite_type_dependencies(), fireRIRrules(), flagInhAttrs(), flagInhTables(), get_rel_oids(), get_relation_by_qualified_name(), get_rels_with_domain(), getIndexes(), getRelationDescription(), getRelationTypeDescription(), getRules(), getTables(), heap_create_with_catalog(), heap_delete(), heap_is_matview_init_state(), heap_prepare_insert(), heap_reloptions(), heap_update(), intorel_startup(), lazy_vacuum_rel(), load_relcache_init_file(), makeTableDataInfo(), objectsInSchemaToOids(), pg_relation_filenode(), pg_relation_filepath(), pgstat_initstats(), pgstat_relation(), plpgsql_parse_cwordtype(), pltcl_init_load_unknown(), RangeVarCallbackForAlterRelation(), RangeVarCallbackOwnsTable(), ReindexDatabase(), RelationBuildDesc(), RelationBuildLocalRelation(), RelationClearRelation(), RelationParseRelOptions(), renameatt_check(), rewriteTargetListUD(), SetMatViewToPopulated(), toast_delete(), toast_insert_or_update(), transformRuleStmt(), transformTableLikeClause(), vac_update_datfrozenxid(), and vacuum_rel().

#define RELKIND_RELATION   'r'

Definition at line 149 of file pg_class.h.

Referenced by AddNewRelationTuple(), AlterTableNamespaceInternal(), analyze_rel(), ATAddForeignKeyConstraint(), ATExecChangeOwner(), ATExecSetRelOptions(), ATPrepAlterColumnType(), ATPrepSetStatistics(), ATRewriteCatalogs(), ATSimplePermissions(), ATSimpleRecursion(), BeginCopyTo(), BootstrapToastTable(), build_row_from_class(), check_relation_privileges(), CheckValidResultRel(), CheckValidRowMarkRel(), CommentObject(), CopyFrom(), CreateTrigger(), DefineIndex(), DefineQueryRewrite(), DefineRelation(), do_autovacuum(), dumpTableSchema(), estimate_rel_size(), exec_object_restorecon(), ExecInitModifyTable(), ExecModifyTable(), ExecSecLabelStmt(), expand_table_name_patterns(), extract_autovac_opts(), extractRelOptions(), find_composite_type_dependencies(), get_rel_oids(), get_relation_by_qualified_name(), get_rels_with_domain(), getIndexes(), getRelationDescription(), getRelationTypeDescription(), getTables(), heap_create_with_catalog(), heap_delete(), heap_prepare_insert(), heap_reloptions(), heap_update(), MergeAttributes(), objectsInSchemaToOids(), pg_relation_filenode(), pg_relation_filepath(), pgstat_initstats(), pgstat_relation(), plpgsql_parse_cwordtype(), pltcl_init_load_unknown(), process_owned_by(), ProcessUtilitySlow(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackOwnsTable(), ReindexDatabase(), relation_is_updatable(), RelationParseRelOptions(), RemoveTriggerById(), renameatt_check(), rewriteTargetListUD(), sepgsql_attribute_drop(), sepgsql_attribute_post_create(), sepgsql_attribute_relabel(), sepgsql_attribute_setattr(), sepgsql_relation_drop(), sepgsql_relation_post_create(), sepgsql_relation_relabel(), sepgsql_relation_setattr(), toast_delete(), toast_insert_or_update(), transformIndexConstraint(), transformTableLikeClause(), truncate_check_rel(), vac_update_datfrozenxid(), vacuum_rel(), and view_is_auto_updatable().

#define RELKIND_SEQUENCE   'S'
#define RELKIND_TOASTVALUE   't'
#define RELKIND_VIEW   'v'
#define RELPERSISTENCE_PERMANENT   'p'
#define RELPERSISTENCE_TEMP   't'
#define RELPERSISTENCE_UNLOGGED   'u'

Typedef Documentation

Definition at line 89 of file pg_class.h.


Function Documentation

CATALOG ( pg_class  ,
1259   
)

Definition at line 32 of file pg_class.h.

{
    NameData    relname;        /* class name */
    Oid         relnamespace;   /* OID of namespace containing this class */
    Oid         reltype;        /* OID of entry in pg_type for table's
                                 * implicit row type */
    Oid         reloftype;      /* OID of entry in pg_type for underlying
                                 * composite type */
    Oid         relowner;       /* class owner */
    Oid         relam;          /* index access method; 0 if not an index */
    Oid         relfilenode;    /* identifier of physical storage file */

    /* relfilenode == 0 means it is a "mapped" relation, see relmapper.c */
    Oid         reltablespace;  /* identifier of table space for relation */
    int32       relpages;       /* # of blocks (not always up-to-date) */
    float4      reltuples;      /* # of tuples (not always up-to-date) */
    int32       relallvisible;  /* # of all-visible blocks (not always
                                 * up-to-date) */
    Oid         reltoastrelid;  /* OID of toast table; 0 if none */
    Oid         reltoastidxid;  /* if toast table, OID of chunk_id index */
    bool        relhasindex;    /* T if has (or has had) any indexes */
    bool        relisshared;    /* T if shared across databases */
    char        relpersistence; /* see RELPERSISTENCE_xxx constants below */
    char        relkind;        /* see RELKIND_xxx constants below */
    int16       relnatts;       /* number of user attributes */

    /*
     * Class pg_attribute must contain exactly "relnatts" user attributes
     * (with attnums ranging from 1 to relnatts) for this class.  It may also
     * contain entries with negative attnums for system attributes.
     */
    int16       relchecks;      /* # of CHECK constraints for class */
    bool        relhasoids;     /* T if we generate OIDs for rows of rel */
    bool        relhaspkey;     /* has (or has had) PRIMARY KEY index */
    bool        relhasrules;    /* has (or has had) any rules */
    bool        relhastriggers; /* has (or has had) any TRIGGERs */
    bool        relhassubclass; /* has (or has had) derived classes */
    TransactionId relfrozenxid; /* all Xids < this are frozen in this rel */
    TransactionId relminmxid;   /* all multixacts in this rel are >= this.
                                 * this is really a MultiXactId */

#ifdef CATALOG_VARLEN           /* variable-length fields start here */
    /* NOTE: These fields are not present in a relcache entry's rd_rel field. */
    aclitem     relacl[1];      /* access permissions */
    text        reloptions[1];  /* access-method-specific options */
#endif
} FormData_pg_class;

DATA ( insert  OID = 1247(pg_typePGNSP 71 0 PGUID 0 0 0 0 0 0 0 0 f f p r 30 0 t f f f f 3 1 _null_ _null_)  ) 
DESCR ( ""   ) 

Variable Documentation

Definition at line 78 of file pg_class.h.