From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Create user or role from inside a function? |
Date: | 2006-09-01 11:26:25 |
Message-ID: | 20060901112625.GJ5671@merkur.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Sep 01, 2006 at 08:13:14PM +1000, Dan wrote:
> I am running PostgreSQL 8.1.4 and I want to create a user from inside a
> function. Is this possible in 8.1?
...
> I have a function like this:
...
> Executing this function yields:
>
> # SELECT user_create('bob',1234,'bobspassword');
> ERROR: column "CREATE USER " does not exist
> CONTEXT: SQL statement "SELECT "CREATE USER " || $1 || " WITH PASSWORD
> " || $2 "
> PL/pgSQL function "user_create" line 2 at execute statement
...
> Any tips would be appreciated.
This might help.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
From | Date | Subject | |
---|---|---|---|
Next Message | Dan | 2006-09-01 11:52:12 | Re: Create user or role from inside a function? |
Previous Message | Andreas Kretschmer | 2006-09-01 11:22:21 | Re: Create user or role from inside a function? |