From: Oli Sennhauser <oli.sennhauser@bluewin.ch>
To: pgsql-admin@postgresql.org
Subject: Re: CREATE USER system privilege?
Date: Sun, 28 Dec 2003 10:42:04 +0100
Message-ID: <3FEEA56C.6080709@bluewin.ch> (raw)
In-Reply-To: <15986.1072106106@sss.pgh.pa.us>
References: <3FE6D077.7000403@bluewin.ch>
<15986.1072106106@sss.pgh.pa.us>
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.sennhauser@bluewin.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/importAttachments:
smime.p7s (application/x-pkcs7-signature, 3.4K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: oli.sennhauser@bluewin.ch
Subject: Re: CREATE USER system privilege?
In-Reply-To: <3FEEA56C.6080709@bluewin.ch>
References: <3FE6D077.7000403@bluewin.ch> <15986.1072106106@sss.pgh.pa.us> <3FEEA56C.6080709@bluewin.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox