Re: plpgsql: Bush becomes a null, can not execute null query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql: Bush becomes a null, can not execute null query
Дата
Msg-id 10442.1062077597@sss.pgh.pa.us
обсуждение исходный текст
Ответ на plpgsql: Bush becomes a null, can not execute null query  (Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>)
Ответы Re: plpgsql: Bush becomes a null,  ("Mauri Sahlberg" <mos@iki.fi>)
Список pgsql-admin
Mauri Sahlberg <Mauri.Sahlberg@claymountain.com> writes:
> If the following is executed in context, where the dynamic query returns
> data with every iteration everythin goes fine. If the the dynamic query
> returns nothing - bush becomes null and everything fails. I do not
> undestand why bush becomes null when the query returns nothing.

If "latest" is null then the result of the series of concatenations is
also null.  Perhaps what you really want is to assign to "latest" inside
the inner FOR-loop.

            regards, tom lane

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

Предыдущее
От: Daniel Michał
Дата:
Сообщение: postgresql and lock an row
Следующее
От: Bruno LEVEQUE
Дата:
Сообщение: Re: How do i get the location or -D paramter to accept a windows