Re: Create User

From: Neil Conway <neilc(at)samurai(dot)com>
To: DB Subscriptions <db(dot)subscriptions(at)shepherdhill(dot)biz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create User
Date: 2006-01-20 15:09:57
Message-ID: 1137769797.9330.8.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2006-01-20 at 09:16 +0100, DB Subscriptions wrote:
> BEGIN
> CREATE USER NEW.userid WITH PASSWORD NEW.pword IN GROUP NEW.groupe;
>
> RETURN new;
> END;

You can't use PL/PgSQL variables in DDL commands. Try using EXECUTE:

EXECUTE 'CREATE USER ' || NEW.userid || '...';

-Neil

In response to

  • Create User at 2006-01-20 08:16:59 from DB Subscriptions

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2006-01-20 15:20:47 Re: autovacuum and temporary tables
Previous Message Matthew T. O'Connor 2006-01-20 15:05:29 Re: autovacuum and temporary tables