поиск:

Chapter 41. System Catalogs

Table of Contents
41.1. Overview
41.2. pg_aggregate
41.3. pg_am
41.4. pg_amop
41.5. pg_amproc
41.6. pg_attrdef
41.7. pg_attribute
41.8. pg_cast
41.9. pg_class
41.10. pg_constraint
41.11. pg_conversion
41.12. pg_database
41.13. pg_depend
41.14. pg_description
41.15. pg_group
41.16. pg_index
41.17. pg_inherits
41.18. pg_language
41.19. pg_largeobject
41.20. pg_listener
41.21. pg_namespace
41.22. pg_opclass
41.23. pg_operator
41.24. pg_proc
41.25. pg_rewrite
41.26. pg_shadow
41.27. pg_statistic
41.28. pg_tablespace
41.29. pg_trigger
41.30. pg_type
41.31. System Views
41.32. pg_indexes
41.33. pg_locks
41.34. pg_rules
41.35. pg_settings
41.36. pg_stats
41.37. pg_tables
41.38. pg_user
41.39. pg_views

The system catalogs are the place where a relational database management system stores schema metadata, such as information about tables and columns, and internal bookkeeping information. PostgreSQL's system catalogs are regular tables. You can drop and recreate the tables, add columns, insert and update values, and severely mess up your system that way. Normally, one should not change the system catalogs by hand, there are always SQL commands to do that. (For example, CREATE DATABASE inserts a row into the pg_database catalog — and actually creates the database on disk.) There are some exceptions for particularly esoteric operations, such as adding index access methods.

41.1. Overview

Table 41-1 lists the system catalogs. More detailed documentation of each catalog follows below.

Most system catalogs are copied from the template database during database creation and are thereafter database-specific. A few catalogs are physically shared across all databases in a cluster; these are noted in the descriptions of the individual catalogs.

Table 41-1. System Catalogs

Catalog NamePurpose
pg_aggregateaggregate functions
pg_amindex access methods
pg_amopaccess method operators
pg_amprocaccess method support procedures
pg_attrdefcolumn default values
pg_attributetable columns ("attributes")
pg_castcasts (data type conversions)
pg_classtables, indexes, sequences, views ("relations")
pg_constraintcheck constraints, unique constraints, primary key constraints, foreign key constraints
pg_conversionencoding conversion information
pg_databasedatabases within this database cluster
pg_dependdependencies between database objects
pg_descriptiondescriptions or comments on database objects
pg_groupgroups of database users
pg_indexadditional index information
pg_inheritstable inheritance hierarchy
pg_languagelanguages for writing functions
pg_largeobjectlarge objects
pg_listenerasynchronous notification support
pg_namespaceschemas
pg_opclassindex access method operator classes
pg_operatoroperators
pg_procfunctions and procedures
pg_rewritequery rewrite rules
pg_shadowdatabase users
pg_statisticplanner statistics
pg_tablespacetablespaces within this database cluster
pg_triggertriggers
pg_typedata types
 
© 1997-2005 PHP Club Team
Rambler's Top100