mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user