diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-08-20 04:46:00 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-08-20 04:46:00 +0000 |
commit | de9801fc62ba9ed905c2f20686459a206d453453 (patch) | |
tree | e6ed5e64ba97e2156230373abb038af9138149be /src/include/utils/builtins.h | |
parent | f736fdb0222ded716bd4f0cdddc06158773d9bc1 (diff) | |
download | postgresql-de9801fc62ba9ed905c2f20686459a206d453453.tar.gz postgresql-de9801fc62ba9ed905c2f20686459a206d453453.zip |
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
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r-- | src/include/utils/builtins.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 3588673c2ae..e9937ad751e 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.192 2002/08/16 23:01:21 tgl Exp $ + * $Id: builtins.h,v 1.193 2002/08/20 04:46:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -315,6 +315,7 @@ extern Datum nonnullvalue(PG_FUNCTION_ARGS); extern Datum oidrand(PG_FUNCTION_ARGS); extern Datum oidsrand(PG_FUNCTION_ARGS); extern Datum userfntest(PG_FUNCTION_ARGS); +extern Datum current_database(PG_FUNCTION_ARGS); /* not_in.c */ extern Datum int4notin(PG_FUNCTION_ARGS); |