From de9801fc62ba9ed905c2f20686459a206d453453 Mon Sep 17 00:00:00 2001
From: Bruce Momjian
Date: Tue, 20 Aug 2002 04:46:00 +0000
Subject: Add current_database().
> Quick system function to pull out the current database.
>
> I've used this a number of times to allow stored procedures to find out
> where they are. Especially useful for those that do logging or hit a
> remote server.
>
> It's called current_database() to match with current_user().
It's also a necessity for an informational schema. The catalog
(database) name is required in a number of places.
Rod Taylor
---
doc/src/sgml/func.sgml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'doc/src')
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index bf2ce4667e2..fddc65e84d3 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,5 +1,5 @@
@@ -5082,6 +5082,11 @@ SELECT NULLIF(value, '(none)') ...
name[]
names of schemas in search path optionally including implicit schemas
+
+ current_database()
+ name
+ name of current database
+
--
cgit v1.2.3