Array dimension as integer

Поиск
Список
Период
Сортировка
Искать
От
Victor Yegorov
Тема
Array dimension as integer
Дата
в 05:55:40
Msg-id
20030508095745.GA22337@nordlb.lv
Список
Дерево обсуждения
Array dimension as integer "Victor Yegorov" <viy@nordlb.lv>
Re: Array dimension as integer Achilleus Mantzios <achill@matrix.gatewaynet.com>
Hello.

I'm using:

 PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.95.3
 
and I'd like to have a function, which would receive array of varchars and then
create and EXECUTE insert statement for each of array elements (array has 1
dimension):

FOR i IN 1..array_length_function($1) LOOP
	EXECUTE ...;
END LOOP;

I've tried to use array_dims, but it gives data in string format:

select test_array('{\'a\'}');
WARNING:  Error occurred while executing PL/pgSQL function test_array
WARNING:  line 8 at select into variables
ERROR:  pg_atoi: error in "[1:1]": can't parse "[1:1]"

I've attached test_array source.

-- 

Victor Yegorov
В списке pgsql-sql по дате отправления
От: Victor Yegorov
Дата:
Сообщение: Re: A minute in timestamp
От: Achilleus Mantzios
Дата:
Сообщение: Re: Array dimension as integer
FAQ