Re: problem with automatic altering of groups

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: problem with automatic altering of groups
Дата
Msg-id 200308201432.56634.josh@agliodbs.com
обсуждение исходный текст
Ответ на problem with automatic altering of groups  ("Matthias Nagl" <mnagl@web.de>)
Список pgsql-sql
Matthias,

> I don't understand why this function ist refused by postgresql with an parse
error at the first $1 as ist every
> other method I tryed to get postgres making an "alter group" with a
variable. I'd be very happy if someone
> could help...

You can't substitute variables for object names.   If you need to construct
dynamic query strings, use PL/pgSQL and EXECUTE:

sql_qry := ''ALTER GROUP '' || $group || '' ADD USER '' || $user;
EXECUTE sql_query;


--
-Josh BerkusAglio Database SolutionsSan Francisco



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

Предыдущее
От: LAIN Lucas TECHTEL
Дата:
Сообщение: Re: Configuring Problem on Solaris............
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: "SELECT IN" Still Broken in 7.4b