From: | Oli Sennhauser <oli(dot)sennhauser(at)bluewin(dot)ch> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: CREATE USER system privilege? |
Date: | 2003-12-28 09:42:04 |
Message-ID: | 3FEEA56C.6080709@bluewin.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hello Tom
>You need to use EXECUTE to construct this query as a string.
>Utility statements in general don't handle parameters.
>
>
Ok. I tried out:
PREPARE create_user(varchar) AS SELECT $1;
ok
EXECUTE create_user('otto');
ok
DEALLOCATE create_user;
ok
PREPARE create_user(varchar) AS CREATE USER $1;
ERROR: syntax error at or near "CREATE" at character 33
--> Then I was looking into the manual and found that PREPARE/EXECUTE
only works with SIUD :-(
Facit: pgplsql does not work for my problem, execute does not work problem.
Is there any other way to enable a user to create other users than
granting superuser rights?
In my opinion it is a little much privileges to just create new users.
Proposal for a next release: CREATE USER system privilege. Where do I
have to request for such a proposal?
Regards Oli
-------------------------------------------------------
Oli Sennhauser
Database-Engineer (Oracle & PostgreSQL)
Rebenweg 6
CH - 8610 Uster / Switzerland
Phone (+41) 1 940 24 82 or Mobile (+41) 79 450 49 14
e-Mail oli(dot)sennhauser(at)bluewin(dot)ch
Website http://mypage.bluewin.ch/shinguz/PostgreSQL/
Secure (signed/encrypted) e-Mail with a Free Personal SwissSign ID: http://www.swisssign.ch
Import the SwissSign Root Certificate: http://swisssign.net/cgi-bin/trust/import
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-28 16:22:51 | Re: CREATE USER system privilege? |
Previous Message | Anjan Dave | 2003-12-28 01:54:45 | Re: Database taking up space rapidly |