Re: Using UNION inside a cursor

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using UNION inside a cursor
Дата
Msg-id 28146.1067527227@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using UNION inside a cursor  (Christoph Haller <ch@rodos.fzk.de>)
Список pgsql-sql
Christoph Haller <ch@rodos.fzk.de> writes:
>> OPEN ref FOR
>> (SELECT  * FROM history  WHERE obs_type =3D \'AA\' )
>> UNION
>> (SELECT  * FROM  history  WHERE   obs_type =3D \'TA\');

> My suspicion is the plpgsql parser doesn't accept the opening 
> parenthesis.

Yeah.  Looking at the plpgsql grammar, it expects the token after FOR to
be either SELECT or EXECUTE.  This example demonstrates that that code
is wrong, so I'll fix it for 7.4.  But in the meantime, why don't you
just leave out the parentheses?
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Bug in Rule+Foreing key constrain?
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: strange postgresql failure