Catalogs: pg_transform

The catalog pg_transform stores information about transforms, which are a mechanism to adapt data types to procedural languages. See CREATE TRANSFORM for more information. Table 50-48. pg_transform Columns Name Type References Description trftype oid pg_type.oid OID of the data type this transform is for trflang oid pg_language.oid OID of the language this transform is for trffromsql regproc pg_proc.oid The OID of the function to use when converting the data type for input to the procedural l

Catalogs: pg_statistic

The catalog pg_statistic stores statistical data about the contents of the database. Entries are created by ANALYZE and subsequently used by the query planner. Note that all the statistical data is inherently approximate, even assuming that it is up-to-date. Normally there is one entry, with stainherit = false, for each table column that has been analyzed. If the table has inheritance children, a second entry with stainherit = true is also created. This row represents the column's statistics ov

Catalogs: pg_shseclabel

The catalog pg_shseclabel stores security labels on shared database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 50.74. See also pg_seclabel, which performs a similar function for security labels involving objects within a single database. Unlike most system catalogs, pg_shseclabel is shared across all databases of a cluster: there is only one copy of pg_shseclabel per cluster, not one per database. Table 5

Catalogs: pg_tables

The view pg_tables provides access to useful information about each table in the database. Table 50-79. pg_tables Columns Name Type References Description schemaname name pg_namespace.nspname Name of schema containing table tablename name pg_class.relname Name of table tableowner name pg_authid.rolname Name of table's owner tablespace name pg_tablespace.spcname Name of tablespace containing table (null if default for database) hasindexes boolean pg_class.relhasindex True if table has (or rece

Catalogs: pg_stats

The view pg_stats provides access to the information stored in the pg_statistic catalog. This view allows access only to rows of pg_statistic that correspond to tables the user has permission to read, and therefore it is safe to allow public read access to this view. pg_stats is also designed to present the information in a more readable format than the underlying catalog — at the cost that its schema must be extended whenever new slot types are defined for pg_statistic. Table 50-78. pg_stats

Catalogs: pg_shdepend

The catalog pg_shdepend records the dependency relationships between database objects and shared objects, such as roles. This information allows PostgreSQL to ensure that those objects are unreferenced before attempting to delete them. See also pg_depend, which performs a similar function for dependencies involving objects within a single database. Unlike most system catalogs, pg_shdepend is shared across all databases of a cluster: there is only one copy of pg_shdepend per cluster, not one per

Catalogs: pg_shdescription

The catalog pg_shdescription stores optional descriptions (comments) for shared database objects. Descriptions can be manipulated with the COMMENT command and viewed with psql's \d commands. See also pg_description, which performs a similar function for descriptions involving objects within a single database. Unlike most system catalogs, pg_shdescription is shared across all databases of a cluster: there is only one copy of pg_shdescription per cluster, not one per database. Table 50-44. pg_s

Catalogs: pg_shadow

The view pg_shadow exists for backwards compatibility: it emulates a catalog that existed in PostgreSQL before version 8.1. It shows properties of all roles that are marked as rolcanlogin in pg_authid. The name stems from the fact that this table should not be readable by the public since it contains passwords. pg_user is a publicly readable view on pg_shadow that blanks out the password field. Table 50-77. pg_shadow Columns Name Type References Description usename name pg_authid.rolname User

Catalogs: pg_roles

The view pg_roles provides access to information about database roles. This is simply a publicly readable view of pg_authid that blanks out the password field. This view explicitly exposes the OID column of the underlying table, since that is needed to do joins to other catalogs. Table 50-73. pg_roles Columns Name Type References Description rolname name Role name rolsuper bool Role has superuser privileges rolinherit bool Role automatically inherits privileges of roles it is a member o

Catalogs: pg_seclabel

The catalog pg_seclabel stores security labels on database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 50.74. See also pg_shseclabel, which performs a similar function for security labels of database objects that are shared across a database cluster. Table 50-42. pg_seclabel Columns Name Type References Description objoid oid any OID column The OID of the object this security label pertains to classoid oid