chkpass

This module implements a data type chkpass that is designed for storing encrypted passwords. Each password is automatically converted to encrypted form upon entry, and is always stored encrypted. To compare, simply compare against a clear text password and the comparison function will encrypt it before comparing. There are provisions in the code to report an error if the password is determined to be easily crackable. However, this is currently just a stub that does nothing. If you precede an in

CHECKPOINT

NameCHECKPOINT -- force a transaction log checkpoint Synopsis CHECKPOINT Description A checkpoint is a point in the transaction log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to disk. Refer to Section 30.4 for more details about what happens during a checkpoint. The CHECKPOINT command forces an immediate checkpoint when the command is issued, without waiting for a regular checkpoint scheduled by the system (

Character Types

Table 8-4. Character Types Name Description character varying(n), varchar(n) variable-length with limit character(n), char(n) fixed-length, blank padded text variable unlimited length Table 8-4 shows the general-purpose character types available in PostgreSQL. SQL defines two primary character types: character varying(n) and character(n), where n is a positive integer. Both of these types can store strings up to n characters (not bytes) in length. An attempt to store a longer string into

Character Set Support

The character set support in PostgreSQL allows you to store text in a variety of character sets (also called encodings), including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as EUC (Extended Unix Code), UTF-8, and Mule internal code. All supported character sets can be used transparently by clients, but a few are not supported for use within the server (that is, as a server-side encoding). The default character set is selected while initializing

Caveats

Some DDL commands, currently only TRUNCATE and the table-rewriting forms of ALTER TABLE, are not MVCC-safe. This means that after the truncation or rewrite commits, the table will appear empty to concurrent transactions, if they are using a snapshot taken before the DDL command committed. This will only be an issue for a transaction that did not access the table in question before the DDL command started — any transaction that has done so would hold at least an ACCESS SHARE table lock, which wo

Catalogs: System Views

In addition to the system catalogs, PostgreSQL provides a number of built-in views. Some system views provide convenient access to some commonly used queries on the system catalogs. Other views provide access to internal server state. The information schema (Chapter 35) provides an alternative set of views which overlap the functionality of the system views. Since the information schema is SQL-standard whereas the views described here are PostgreSQL-specific, it's usually better to use the info

Catalogs: pg_views

The view pg_views provides access to useful information about each view in the database. Table 50-84. pg_views Columns Name Type References Description schemaname name pg_namespace.nspname Name of schema containing view viewname name pg_class.relname Name of view viewowner name pg_authid.rolname Name of view's owner definition text View definition (a reconstructed SELECT query) Prev Next pg_user_mappings Up Frontend/Backend Protocol

Catalogs: pg_user_mappings

The view pg_user_mappings provides access to information about user mappings. This is essentially a publicly readable view of pg_user_mapping that leaves out the options field if the user has no rights to use it. Table 50-83. pg_user_mappings Columns Name Type References Description umid oid pg_user_mapping.oid OID of the user mapping srvid oid pg_foreign_server.oid The OID of the foreign server that contains this mapping srvname name pg_foreign_server.srvname Name of the foreign server umuse

Catalogs: pg_user_mapping

The catalog pg_user_mapping stores the mappings from local user to remote. Access to this catalog is restricted from normal users, use the view pg_user_mappings instead. Table 50-57. pg_user_mapping Columns Name Type References Description oid oid Row identifier (hidden attribute; must be explicitly selected) umuser oid pg_authid.oid OID of the local role being mapped, 0 if the user mapping is public umserver oid pg_foreign_server.oid The OID of the foreign server that contains this mapping

Catalogs: pg_user

The view pg_user provides access to information about database users. This is simply a publicly readable view of pg_shadow that blanks out the password field. Table 50-82. pg_user Columns Name Type Description usename name User name usesysid oid ID of this user usecreatedb bool User can create databases usesuper bool User is a superuser userepl bool User can initiate streaming replication and put the system in and out of backup mode. usebypassrls bool User bypasses every row level security po