Re: Can't get the field = ANY(array) clause to work...

Поиск
Список
Период
Сортировка
От nboutelier@hotmail.com
Тема Re: Can't get the field = ANY(array) clause to work...
Дата
Msg-id 1138907045.513329.12210@g49g2000cwa.googlegroups.com
обсуждение исходный текст
Ответ на Can't get the field = ANY(array) clause to work...  (nboutelier@hotmail.com)
Ответы Re: Can't get the field = ANY(array) clause to work...  (Bricklen Anderson <banderson@presinet.com>)
Re: Can't get the field = ANY(array) clause to work...  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
The problem was fixed by initializing the array before giving it a
value. Not surprising Postges isnt as popular as it should be. I was by
luck that I found this out - the manual says nothing about init arrays.

DECLARE
  id_var INTEGER[];
  record_var RECORD;
BEGIN
  id_var := '{}';
  id_var[0] := 1;
  id_var[1] := 2;
  id_var[2] := 3;
  FOR record_var IN
    SELECT id FROM myTable WHERE id = ANY(id_var)
  LOOP
    RETURN NEXT record_var.id;
  END LOOP;
  RETURN;
END;


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

Предыдущее
От: "Trans Porter"
Дата:
Сообщение: pgsql on win xp user permissions
Следующее
От: nboutelier@hotmail.com
Дата:
Сообщение: Re: Equivalent of a RECORD[] data type used in a function?