Re: Problem with function-arguments

From: Hans Peter Ertz <hansi_mailinglisten(at)gmx(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Problem with function-arguments
Date: 2009-04-24 23:17:04
Message-ID: 49F24870.1020807@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dot Yet 2009-04-25 04:20:08 Re: How to map columns in pg_stat_activity to windows PID
Previous Message Hans Peter Ertz 2009-04-24 21:31:13 Problem with function-arguments