Re: Using current_database() in a grant - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Using current_database() in a grant
Date
Msg-id 20021020154153.GA15114@wolff.to
Whole thread Raw
In response to Using current_database() in a grant  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
On Sun, Oct 20, 2002 at 10:27:15 -0500,
  Bruno Wolff III <bruno@wolff.to> wrote:
> In 7.3b1 I am trying to use current_database in a grant statement to
> give access to the current database in a script. Since I really
> only have one database I plan on using the script for I can just
> hard code the name. However I would think it would be nice to allow
> this to work so people can keep their scripts more general without
> having to do more complicated mechanisms.
>
> Here is what happens when I try this:
> area=# grant create on database current_database() to bruno;
> ERROR:  parser: parse error at or near "(" at character 42

I guess using :DBNAME in psgl is just as easy, but it does seem odd
that I can't use the function.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Using current_database() in a grant
Next
From: Bruno Wolff III
Date:
Subject: Problem granting usage on language c