Re: help using arrays in a function

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: help using arrays in a function
Дата
Msg-id 403E6300.6090908@joeconway.com
обсуждение исходный текст
Ответ на help using arrays in a function  ("Jennifer Lee" <jlee@scri.sari.ac.uk>)
Список pgsql-general
Jennifer Lee wrote:
>            WHILE a[i] LOOP

This problem has nothing to do with arrays, per se. PL/pgSQL no longer
assumes it can coerce an integer constant to a boolean. Instead make the
above line look like this:

              WHILE a[i] IS NOT NULL LOOP


BTW, in 7.4 you could more easily get the same result like this:

regression=# select 82 = any ('{100,92,82}');
  ?column?
----------
  t
(1 row)

regression=# select 82 = any ('{100,92}');
  ?column?
----------
  f
(1 row)

See:
http://www.postgresql.org/docs/current/static/functions-comparisons.html

HTH,

Joe

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

Предыдущее
От: Erwin Van de Velde
Дата:
Сообщение: Postmasters pile up
Следующее
От: "Keith Bottner"
Дата:
Сообщение: Re: Postgres clustering?