WARNING

This text was automatically converted from troff me macros to HTML. Information may have been lost, added, or changed in the process. Lars Aronsson and Lysator do not guarantee the correctness of this HTML document.

NAME

purge *- discard historical data

SYNOPSIS

purge classname [ before abstime ] [ after reltime ]

DESCRIPTION

Purge allows a user to specify the historical retention properties of a class. The date specified is an absolute time such as Jan 1 1987, and POSTGRES will discard tuples whose validity expired before the indicated time. Purge with no before clause is equivalent to purge before now. Until specified with a purge command, instance preservation defaults to forever.

The user may purge a class at any time as long as the purge date never decreases. POSTGRES will enforce this restriction, silently.

EXAMPLE

/* Always discard data in the EMP class */
/* prior to January 1, 1989             */

purge EMP before "Jan 1 1989"

/* Retain only the current data in EMP */

purge EMP

BUGS

Error messages are quite unhelpful. A complaint about "inconsistent times" followed by several nine-digit numbers indicates an attempt to "back up" a purge date on a relation.