From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/ecpg-sql-disconnect.html | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/src/sgml/html/ecpg-sql-disconnect.html (limited to 'doc/src/sgml/html/ecpg-sql-disconnect.html') diff --git a/doc/src/sgml/html/ecpg-sql-disconnect.html b/doc/src/sgml/html/ecpg-sql-disconnect.html new file mode 100644 index 0000000..7528efc --- /dev/null +++ b/doc/src/sgml/html/ecpg-sql-disconnect.html @@ -0,0 +1,35 @@ + +DISCONNECT

DISCONNECT

DISCONNECT — terminate a database connection

Synopsis

+DISCONNECT connection_name
+DISCONNECT [ CURRENT ]
+DISCONNECT ALL
+

Description

+ DISCONNECT closes a connection (or all + connections) to the database. +

Parameters

connection_name

+ A database connection name established by + the CONNECT command. +

CURRENT

+ Close the current connection, which is either + the most recently opened connection, or the connection set by + the SET CONNECTION command. This is also + the default if no argument is given to + the DISCONNECT command. +

ALL

+ Close all open connections. +

Examples

+int
+main(void)
+{
+    EXEC SQL CONNECT TO testdb AS con1 USER testuser;
+    EXEC SQL CONNECT TO testdb AS con2 USER testuser;
+    EXEC SQL CONNECT TO testdb AS con3 USER testuser;
+
+    EXEC SQL DISCONNECT CURRENT;  /* close con3          */
+    EXEC SQL DISCONNECT ALL;      /* close con2 and con1 */
+
+    return 0;
+}
+

Compatibility

+ DISCONNECT is specified in the SQL standard. +

\ No newline at end of file -- cgit v1.2.3