summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/portals.out
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2007-04-12 06:53:49 +0000
committerNeil Conway <neilc@samurai.com>2007-04-12 06:53:49 +0000
commitd13e903beaecd45a3721e4c2a7f9ff842ce94a79 (patch)
tree3ded6910c6f451bb982fb5033735afd24927c5b6 /src/test/regress/expected/portals.out
parente6e47f278d2ab0fc744b56fed86cc34299079037 (diff)
downloadpostgresql-d13e903beaecd45a3721e4c2a7f9ff842ce94a79.tar.gz
RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
reviewed by Neil Conway. This patch adds the following DDL command variants: RESET SESSION, RESET TEMP, RESET PLANS, CLOSE ALL, and DEALLOCATE ALL. RESET SESSION is intended for use by connection pool software and the like, in order to reset a client session to something close to its initial state. Note that while most of these command variants can be executed inside a transaction block (but are not transaction-aware!), RESET SESSION cannot. While this is inconsistent, it is intended to catch programmer mistakes: RESET SESSION in an open transaction block is probably unintended.
Diffstat (limited to 'src/test/regress/expected/portals.out')
-rw-r--r--src/test/regress/expected/portals.out30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/regress/expected/portals.out b/src/test/regress/expected/portals.out
index ab62ac2705..9b22aa4dc7 100644
--- a/src/test/regress/expected/portals.out
+++ b/src/test/regress/expected/portals.out
@@ -869,3 +869,33 @@ EXECUTE cprep;
c2 | declare c2 cursor with hold for select count_tt1_v(), count_tt1_s(); | t | f | f
(1 row)
+-- test CLOSE ALL;
+SELECT name FROM pg_cursors ORDER BY 1;
+ name
+------
+ c2
+(1 row)
+
+CLOSE ALL;
+SELECT name FROM pg_cursors ORDER BY 1;
+ name
+------
+(0 rows)
+
+BEGIN;
+DECLARE foo1 CURSOR WITH HOLD FOR SELECT 1;
+DECLARE foo2 CURSOR WITHOUT HOLD FOR SELECT 1;
+SELECT name FROM pg_cursors ORDER BY 1;
+ name
+------
+ foo1
+ foo2
+(2 rows)
+
+CLOSE ALL;
+SELECT name FROM pg_cursors ORDER BY 1;
+ name
+------
+(0 rows)
+
+COMMIT;