<HTML ><HEAD ><TITLE >System Catalogs</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.73 "><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 7.3.2 Documentation" HREF="index.html"><LINK REL="UP" TITLE="PostgreSQL 7.3.2 Developer's Guide" HREF="developer.html"><LINK REL="PREVIOUS" TITLE="Executor" HREF="executor.html"><LINK REL="NEXT" TITLE="pg_aggregate" HREF="catalog-pg-aggregate.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META NAME="creation" CONTENT="2003-02-03T20:17:34"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PostgreSQL 7.3.2 Documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="executor.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="catalog-pg-aggregate.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="CATALOGS" >Chapter 3. System Catalogs</A ></H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >3.1. <A HREF="catalogs.html#CATALOGS-OVERVIEW" >Overview</A ></DT ><DT >3.2. <A HREF="catalog-pg-aggregate.html" >pg_aggregate</A ></DT ><DT >3.3. <A HREF="catalog-pg-am.html" >pg_am</A ></DT ><DT >3.4. <A HREF="catalog-pg-amop.html" >pg_amop</A ></DT ><DT >3.5. <A HREF="catalog-pg-amproc.html" >pg_amproc</A ></DT ><DT >3.6. <A HREF="catalog-pg-attrdef.html" >pg_attrdef</A ></DT ><DT >3.7. <A HREF="catalog-pg-attribute.html" >pg_attribute</A ></DT ><DT >3.8. <A HREF="catalog-pg-cast.html" >pg_cast</A ></DT ><DT >3.9. <A HREF="catalog-pg-class.html" >pg_class</A ></DT ><DT >3.10. <A HREF="catalog-pg-constraint.html" >pg_constraint</A ></DT ><DT >3.11. <A HREF="catalog-pg-conversion.html" >pg_conversion</A ></DT ><DT >3.12. <A HREF="catalog-pg-database.html" >pg_database</A ></DT ><DT >3.13. <A HREF="catalog-pg-depend.html" >pg_depend</A ></DT ><DT >3.14. <A HREF="catalog-pg-description.html" >pg_description</A ></DT ><DT >3.15. <A HREF="catalog-pg-group.html" >pg_group</A ></DT ><DT >3.16. <A HREF="catalog-pg-index.html" >pg_index</A ></DT ><DT >3.17. <A HREF="catalog-pg-inherits.html" >pg_inherits</A ></DT ><DT >3.18. <A HREF="catalog-pg-language.html" >pg_language</A ></DT ><DT >3.19. <A HREF="catalog-pg-largeobject.html" >pg_largeobject</A ></DT ><DT >3.20. <A HREF="catalog-pg-listener.html" >pg_listener</A ></DT ><DT >3.21. <A HREF="catalog-pg-namespace.html" >pg_namespace</A ></DT ><DT >3.22. <A HREF="catalog-pg-opclass.html" >pg_opclass</A ></DT ><DT >3.23. <A HREF="catalog-pg-operator.html" >pg_operator</A ></DT ><DT >3.24. <A HREF="catalog-pg-proc.html" >pg_proc</A ></DT ><DT >3.25. <A HREF="catalog-pg-rewrite.html" >pg_rewrite</A ></DT ><DT >3.26. <A HREF="catalog-pg-shadow.html" >pg_shadow</A ></DT ><DT >3.27. <A HREF="catalog-pg-statistic.html" >pg_statistic</A ></DT ><DT >3.28. <A HREF="catalog-pg-trigger.html" >pg_trigger</A ></DT ><DT >3.29. <A HREF="catalog-pg-type.html" >pg_type</A ></DT ></DL ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="CATALOGS-OVERVIEW" >3.1. Overview</A ></H1 ><P > 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. <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >'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, <TT CLASS="COMMAND" >CREATE DATABASE</TT > inserts a row into the <TT CLASS="STRUCTNAME" >pg_database</TT > catalog -- and actually creates the database on disk.) There are some exceptions for especially esoteric operations, such as adding index access methods. </P ><P > 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 an installation; these are marked in the descriptions of the individual catalogs. </P ><DIV CLASS="TABLE" ><A NAME="AEN52242" ></A ><P ><B >Table 3-1. System Catalogs</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH ALIGN="LEFT" VALIGN="TOP" >Catalog Name</TH ><TH ALIGN="LEFT" VALIGN="TOP" >Purpose</TH ></TR ></THEAD ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-aggregate.html" > <SPAN CLASS="DATABASE" >pg_aggregate</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >aggregate functions</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" >pg_am</TD ><TD ALIGN="LEFT" VALIGN="TOP" >index access methods</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" >pg_amop</TD ><TD ALIGN="LEFT" VALIGN="TOP" >access method operators</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" >pg_amproc</TD ><TD ALIGN="LEFT" VALIGN="TOP" >access method support procedures</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-attrdef.html" > <SPAN CLASS="DATABASE" >pg_attrdef</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >column default values</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-attribute.html" > <SPAN CLASS="DATABASE" >pg_attribute</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >table columns (<SPAN CLASS="QUOTE" >"attributes"</SPAN >, <SPAN CLASS="QUOTE" >"fields"</SPAN >)</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-cast.html" > <SPAN CLASS="DATABASE" >pg_cast</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >casts (data type conversions)</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-class.html" > <SPAN CLASS="DATABASE" >pg_class</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >tables, indexes, sequences (<SPAN CLASS="QUOTE" >"relations"</SPAN >)</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-constraint.html" > <SPAN CLASS="DATABASE" >pg_constraint</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >check constraints, unique / primary key constraints, foreign key constraints</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-conversion.html" > <SPAN CLASS="DATABASE" >pg_conversion</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >encoding conversion information</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-database.html" > <SPAN CLASS="DATABASE" >pg_database</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >databases within this database cluster</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-depend.html" > <SPAN CLASS="DATABASE" >pg_depend</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >dependencies between database objects</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-description.html" > <SPAN CLASS="DATABASE" >pg_description</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >descriptions or comments on database objects</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-group.html" > <SPAN CLASS="DATABASE" >pg_group</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >groups of database users</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-index.html" > <SPAN CLASS="DATABASE" >pg_index</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >additional index information</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-inherits.html" > <SPAN CLASS="DATABASE" >pg_inherits</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >table inheritance hierarchy</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-language.html" > <SPAN CLASS="DATABASE" >pg_language</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >languages for writing functions</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-largeobject.html" > <SPAN CLASS="DATABASE" >pg_largeobject</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >large objects</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-listener.html" > <SPAN CLASS="DATABASE" >pg_listener</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >asynchronous notification</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-namespace.html" > <SPAN CLASS="DATABASE" >pg_namespace</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >namespaces (schemas)</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-opclass.html" > <SPAN CLASS="DATABASE" >pg_opclass</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >index access method operator classes</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-operator.html" > <SPAN CLASS="DATABASE" >pg_operator</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >operators</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-proc.html" > <SPAN CLASS="DATABASE" >pg_proc</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >functions and procedures</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-rewrite.html" > <SPAN CLASS="DATABASE" >pg_rewrite</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >query rewriter rules</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-shadow.html" > <SPAN CLASS="DATABASE" >pg_shadow</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >database users</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-statistic.html" > <SPAN CLASS="DATABASE" >pg_statistic</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >optimizer statistics</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-trigger.html" > <SPAN CLASS="DATABASE" >pg_trigger</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >triggers</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A HREF="catalog-pg-type.html" > <SPAN CLASS="DATABASE" >pg_type</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" >data types</TD ></TR ></TBODY ></TABLE ></DIV ><P > More detailed documentation of each catalog follows below. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="executor.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="catalog-pg-aggregate.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Executor</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="developer.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >pg_aggregate</TD ></TR ></TABLE ></DIV ></BODY ></HTML >