DISCARD
discard session state
- Provided by: postgresql-client-18 (Version: 18.3-1)
- Source: postgresql-18
- Report a bug
discard session state
DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP }
DISCARD releases internal resources associated with a database session. This command is useful for partially or fully resetting the session's state. There are several subcommands to release different types of resources; the DISCARD ALL variant subsumes all the others, and also resets additional state.
PLANS
SEQUENCES
TEMPORARY or TEMP
ALL
CLOSE ALL; SET SESSION AUTHORIZATION DEFAULT; RESET ALL; DEALLOCATE ALL; UNLISTEN *; SELECT pg_advisory_unlock_all(); DISCARD PLANS; DISCARD TEMP; DISCARD SEQUENCES;
DISCARD ALL cannot be executed inside a transaction block.
DISCARD is a PostgreSQL extension.