Re: Create User

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Create User
Дата
Msg-id 1137769797.9330.8.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Create User  (DB Subscriptions <db.subscriptions@shepherdhill.biz>)
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: autovacuum and temporary tables
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: autovacuum and temporary tables