4 DISCARD — discard session state
8 DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP }
12 DISCARD releases internal resources associated with a database session.
13 This command is useful for partially or fully resetting the session's
14 state. There are several subcommands to release different types of
15 resources; the DISCARD ALL variant subsumes all the others, and also
16 resets additional state.
21 Releases all cached query plans, forcing re-planning to occur
22 the next time the associated prepared statement is used.
25 Discards all cached sequence-related state, including
26 currval()/lastval() information and any preallocated sequence
27 values that have not yet been returned by nextval(). (See CREATE
28 SEQUENCE for a description of preallocated sequence values.)
31 Drops all temporary tables created in the current session.
34 Releases all temporary resources associated with the current
35 session and resets the session to its initial state. Currently,
36 this has the same effect as executing the following sequence of
40 SET SESSION AUTHORIZATION DEFAULT;
44 SELECT pg_advisory_unlock_all();
51 DISCARD ALL cannot be executed inside a transaction block.
55 DISCARD is a PostgreSQL extension.