plpgsql nitpicking -- possible TODO item?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема plpgsql nitpicking -- possible TODO item?
Дата
Msg-id 030e01c1c327$6d115d80$8001a8c0@jester
обсуждение исходный текст
Список pgsql-hackers
In order to add items to an array:
ie. array[2] := variable;

Use the below works, but is quite slow (due to the execute):

DECLARE data ALIAS FOR $1; arr text[];
 -- Required due to bad arrays query text; rec RECORD;
BEGIN
 -- WHAT WE WANT: -- arr[1] := data;

 -- HERE''S HOW WE DO IT: query := ''SELECT cast(''''{"'' || data || ''"}'''' as _text) as
arr'';
 -- Expecting a single loop only. FOR rec IN EXECUTE query LOOP   arr := rec.arr; END LOOP

END;

--
Rod Taylor

Your eyes are weary from staring at the CRT. You feel sleepy. Notice
how restful it is to watch the cursor blink. Close your eyes. The
opinions stated above are yours. You cannot imagine why you ever felt
otherwise.




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: elog() patch
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: elog() patch