1DISCARD(7)                       SQL Commands                       DISCARD(7)
2
3
4

NAME

6       DISCARD - discard session state
7
8

SYNOPSIS

10       DISCARD { ALL | PLANS | TEMPORARY | TEMP }
11
12

DESCRIPTION

14       DISCARD releases internal resources associated with a database session.
15       These resources are normally released at the end of the session.
16
17       DISCARD TEMP drops all temporary tables created in the current session.
18       DISCARD  PLANS  releases all internally cached query plans. DISCARD ALL
19       resets a session to its original state, discarding temporary  resources
20       and resetting session-local configuration changes.
21

PARAMETERS

23       TEMPORARY or TEMP
24              Drops all temporary tables created in the current session.
25
26       PLANS  Releases all cached query plans.
27
28       ALL    Releases  all  temporary  resources  associated with the current
29              session and resets the session to its initial state.  Currently,
30              this  has the same effect as executing the following sequence of
31              statements:
32
33              SET SESSION AUTHORIZATION DEFAULT;
34              RESET ALL;
35              DEALLOCATE ALL;
36              CLOSE ALL;
37              UNLISTEN *;
38              SELECT pg_advisory_unlock_all();
39              DISCARD PLANS;
40              DISCARD TEMP;
41
42

NOTES

44       DISCARD ALL cannot be executed inside a transaction block.
45

COMPATIBILITY

47       DISCARD is a PostgreSQL extension.
48
49
50
51SQL - Language Statements         2011-09-22                        DISCARD(7)
Impressum