Problem with FOR LOOP query

Поиск
Список
Период
Сортировка
От Greg Quinn
Тема Problem with FOR LOOP query
Дата
Msg-id 002401c735b6$8e486e60$6501a8c0@melt
обсуждение исходный текст
Ответы Re: Problem with FOR LOOP query
Список pgsql-novice
I am using EMS's PostGreSQL manager to create a new function using language
SQL and pgSQL

In my function I am trying to declare a variable of type RECORD.

DECLARE curRecord RECORD;

But it gives an error. It also doesn't like my FOR LOOP

FOR curRecord IN SELECT messageid from email_inbox where folderid = $1 LOOP
    EXECUTE sp_deleteemailinboxmessagetodeleteditems(curRecord.messageid);
LOOP;

What I don't understand is the documentation says this is how one declares
your variable and the FOR loop but it doesn't work.

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

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: ODBC Linked Table Problems
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with FOR LOOP query