Using current_database() in a grant

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-general(at)postgresql(dot)org
Subject: Using current_database() in a grant
Date: 2002-10-20 15:27:15
Message-ID: 20021020152715.GA15001@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-10-20 15:41:53 Re: Using current_database() in a grant
Previous Message Bruce Momjian 2002-10-20 03:01:18 Re: [GENERAL] [PATCH] PL/Perl (Mis-)Behavior with Runtime Error Reporting