From 16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Thu, 26 Apr 2007 16:13:15 +0000 Subject: Rename the newly-added commands for discarding session state. RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL, DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid confusion with the pre-existing RESET variants: the DISCARD commands are not actually similar to RESET. Patch from Marko Kreen, with some minor editorialization. --- doc/src/sgml/ref/allfiles.sgml | 3 +- doc/src/sgml/ref/discard.sgml | 107 +++++++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/reset.sgml | 59 +---------------------- doc/src/sgml/reference.sgml | 3 +- 4 files changed, 112 insertions(+), 60 deletions(-) create mode 100644 doc/src/sgml/ref/discard.sgml (limited to 'doc/src') diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 3b9b8b952ee..90ad9adc53c 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -1,5 +1,5 @@ @@ -61,6 +61,7 @@ Complete list of usable sgml source files in this directory. + diff --git a/doc/src/sgml/ref/discard.sgml b/doc/src/sgml/ref/discard.sgml new file mode 100644 index 00000000000..731f34136e1 --- /dev/null +++ b/doc/src/sgml/ref/discard.sgml @@ -0,0 +1,107 @@ + + + + + DISCARD + SQL - Language Statements + + + + DISCARD + Discard internal server state + + + + DISCARD + + + + +DISCARD { ALL | PLANS | TEMPORARY | TEMP } + + + + + Description + + + DISCARD releases internal resources associated with a + database session. These resources are normally released at the end + of the session. + + + + DISCARD TEMP drops all temporary tables created in the + current session. DISCARD PLANS releases all internally + cached query plans. DISCARD ALL resets a session to + its original state, discarding temporary resources and resetting + session-local configuration changes. + + + + + Parameters + + + + + TEMPORARY or TEMP + + + Drops all temporary tables created in the current session. + + + + + + PLANS + + + Releases all cached query plans. + + + + + + ALL + + + Releases all temporary resources associated with the current + session and resets the session to its initial state. This has + the same effect as executing the following sequence of + statements: + +SET SESSION AUTHORIZATION DEFAULT; +RESET ALL; +DEALLOCATE ALL; +CLOSE ALL; +UNLISTEN *; +DISCARD PLANS; +DISCARD TEMP; + + + + + + + + + + Notes + + + DISCARD ALL cannot be executed inside a transaction block. + + + + + Compatibility + + + DISCARD is a PostgreSQL extension. + + + diff --git a/doc/src/sgml/ref/reset.sgml b/doc/src/sgml/ref/reset.sgml index e98f7ff56c6..355de891287 100644 --- a/doc/src/sgml/ref/reset.sgml +++ b/doc/src/sgml/ref/reset.sgml @@ -1,5 +1,5 @@ @@ -22,7 +22,6 @@ PostgreSQL documentation RESET configuration_parameter RESET ALL -RESET { PLANS | SESSION | TEMP | TEMPORARY } @@ -53,15 +52,6 @@ SET configuration_parameter TO DEFA See the SET reference page for details on the transaction behavior of RESET. - - - RESET can also be used to release internal resources - that are usually released at the end of session. RESET - TEMP drops all temporary tables created in the current session. - RESET PLANS releases all internally cached plans. - RESET SESSION releases all externally visible temporary - resources associated with the current session. - @@ -86,56 +76,9 @@ SET configuration_parameter TO DEFA - - - TEMP, TEMPORARY - - - Drops all temporary tables created in the current session. - - - - - - PLANS - - - Releases all cached query plans. - - - - - - SESSION - - - Releases all temporary resources associated with the current - session. This has the same effect as executing the following - command sequence: - -SET SESSION AUTHORIZATION DEFAULT; -RESET ALL; -DEALLOCATE ALL; -CLOSE ALL; -UNLISTEN *; -RESET PLANS; -RESET TEMP; - - - - - - - Notes - - - RESET SESSION cannot be executed inside a transaction block. - - - Examples diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml index 06c6c4a21db..06699a5b34b 100644 --- a/doc/src/sgml/reference.sgml +++ b/doc/src/sgml/reference.sgml @@ -1,4 +1,4 @@ - + Reference @@ -89,6 +89,7 @@ &deallocate; &declare; &delete; + &discard; &dropAggregate; &dropCast; &dropConversion; -- cgit v1.2.3