1DISCARD(7) SQL Commands DISCARD(7)
2
3
4
6 DISCARD - discard session state
7
8
10 DISCARD { ALL | PLANS | TEMPORARY | TEMP }
11
12
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
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
44 DISCARD ALL cannot be executed inside a transaction block.
45
47 DISCARD is a PostgreSQL extension.
48
49
50
51SQL - Language Statements 2014-02-17 DISCARD(7)