Re: How to hand over array as variable in plpgsql function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to hand over array as variable in plpgsql function?
Дата
Msg-id 23347.1225136790@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to hand over array as variable in plpgsql function?  ("Jan Peters" <petersjan@gmx.at>)
Ответы Re: How to hand over array as variable in plpgsql function?
Список pgsql-sql
"Jan Peters" <petersjan@gmx.at> writes:
> ERROR: operator is not unique: "unknown" || real[]

> EXECUTE 'SELECT id FROM precip_arrays WHERE  '||b||' = precip_control;' INTO id_result;

Seems like using EXECUTE is the hardest possible way to do this.  Why
don't you just SELECT?

SELECT id FROM precip_arrays WHERE b = precip_control INTO id_result;

If you insist on using EXECUTE then you're going to have to fool with
converting the array to an appropriate text representation.
        regards, tom lane


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

Предыдущее
От: "Osvaldo Kussama"
Дата:
Сообщение: Fwd: grouping/clustering query
Следующее
От: "Jan Peters"
Дата:
Сообщение: Re: How to hand over array as variable in plpgsql function?