Re: Rules and variables?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Rules and variables?
Дата
Msg-id 200205171653.33416.josh@agliodbs.com
обсуждение исходный текст
Ответ на Rules and variables?  (Christian Rishoej <chrris@mail.dk>)
Список pgsql-sql
Christian,

> I need to hold an integer value and use it in some queries in a rule I
> have. I tried to use a temporary table, but without luck (got an error
> like    Relation "tmpfoo" does not exist   ).
>
> My question is: How can I hold this value thoughout the rule? Can I use
> variables of some sort?

Have the rule execute a PL/pgSQL function.  PL/pgSQL has full variable
support; see the documentation under "procedural functions".



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

Предыдущее
От: Christian Rishoej
Дата:
Сообщение: Rules and variables?
Следующее
От: Josh Berkus
Дата:
Сообщение: PL/pgSQL TODO