[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-admin
Subject: Re: [ADMIN] Problem with function-arguments
From: Hans Peter Ertz <hansi_mailinglisten () gmx ! net>
Date: 2009-04-24 23:17:04
Message-ID: 49F24870.1020807 () gmx ! net
[Download RAW message or body]
Hello again!
Problem solved!
I switched my language to plpgsql and used the execute-command. The
function now looks like:
CREATE OR REPLACE FUNCTION sys.create_user(character varying, character
varying)
RETURNS void AS
$BODY$
BEGIN
execute 'CREATE USER ' || quote_ident($1) || ' PASSWORD ' ||
quote_literal($2) || ' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE';
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE SECURITY DEFINER;
Nevertheless - thanks for thinking ;-),
Hans Peter Ertz
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic