Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
DISCARD
Prev UpSQL CommandsHome Next

DISCARD

DISCARD — discard session state

Synopsis

DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP }

Description

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; theDISCARD ALL variant subsumes all the others, and also resets additional state.

Parameters

PLANS

Releases all cached query plans, forcing re-planning to occur the next time the associated prepared statement is used.

SEQUENCES

Discards all cached sequence-related state, includingcurrval()/lastval() information and any preallocated sequence values that have not yet been returned bynextval(). (SeeCREATE SEQUENCE for a description of preallocated sequence values.)

TEMPORARY orTEMP

Drops all temporary tables created in the current session.

ALL

Releases all temporary resources associated with the current session and resets the session to its initial state. Currently, this has the same effect as executing the following sequence of statements:

CLOSE ALL;SET SESSION AUTHORIZATION DEFAULT;RESET ALL;DEALLOCATE ALL;UNLISTEN *;SELECT pg_advisory_unlock_all();DISCARD PLANS;DISCARD TEMP;DISCARD SEQUENCES;

Notes

DISCARD ALL cannot be executed inside a transaction block.

Compatibility

DISCARD is aPostgreSQL extension.


Prev Up Next
DELETE Home DO
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp