Re: PL/PGSQL - dynamic variable names

Поиск
Список
Период
Сортировка
От Ben Carbery
Тема Re: PL/PGSQL - dynamic variable names
Дата
Msg-id BANLkTi=2Ku8Y1pGe6UCgKz6QG2cixFjAaQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/PGSQL - dynamic variable names  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: PL/PGSQL - dynamic variable names
Re: PL/PGSQL - dynamic variable names
Список pgsql-general

Hm, "a" isn't a variable,it's the value of stuff[1].  

It's both..

DECLARE
    a integer;
    b integer;

The point is I want a dynamically named variable. Here I've named them the same as stuff[i] but they can be anything provided it is a different variable name on each loop iteration. The manual is not entirely clear on where loop variable substitution does and does not apply with FOR.

 
Did you try
declaring a,b,c,d as the return type of the respective functions?


How would this help?

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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: PL/PGSQL - dynamic variable names
Следующее
От: Shigeru Hanada
Дата:
Сообщение: Re: FOREIGN TABLE with dblink