Re: current_database() - Mailing list pgsql-patches

From Tom Lane
Subject Re: current_database()
Date
Msg-id 12420.1028693412@sss.pgh.pa.us
Whole thread Raw
In response to current_database()  (Rod Taylor <rbt@zort.ca>)
Responses Re: current_database()  (Rod Taylor <rbt@zort.ca>)
List pgsql-patches
Rod Taylor <rbt@zort.ca> writes:
> + Datum
> + current_database(PG_FUNCTION_ARGS)
> + {
> +     PG_RETURN_NAME(DatabaseName);
>   }

DatabaseName is not actually a NAME, only a C string.  You need a palloc
and a namestrcpy in there.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: prepareable statements
Next
From: "Ulrich Neumann"
Date:
Subject: Patch for NetWare port