Re: current_database()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: current_database()
Date: 2002-08-07 04:10:12
Message-ID: 12420.1028693412@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Rod Taylor <rbt(at)zort(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ulrich Neumann 2002-08-07 10:43:55 Patch for NetWare port
Previous Message Neil Conway 2002-08-07 02:57:54 Re: prepareable statements