Re: at for over select rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: at for over select rows
Дата
Msg-id 14093.1054181590@sss.pgh.pa.us
обсуждение исходный текст
Ответ на at for over select rows  (al_nunes@atua.com.br)
Список pgsql-bugs
al_nunes@atua.com.br writes:
> NOTICE:  Error occurred while executing PL/pgSQL function apaga_constraint
> NOTICE:  line 20 at for over select rows
> ERROR:  parser: parse error at or near "$1"

> DECLARE
>   qtd        INTEGER;
    ^^^

>       FOR registro IN
>         SELECT t.tgrelid, COUNT(t.tgname) AS qtd
                                               ^^^

Never use a name in an SQL statement that is the same as a name you've
declared as a plpgsql variable, unless your intent is for the value of
that variable to be substituted at that point in the statement.  Which
is certainly not what you want here.

            regards, tom lane

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

Предыдущее
От: al_nunes@atua.com.br
Дата:
Сообщение: at for over select rows
Следующее
От: Sean Chittenden
Дата:
Сообщение: Re: segv's on CREATE INDEX with recent HEAD...