Vectors in Pl/PgSQL

Поиск
Список
Период
Сортировка
От Oleg Lebedev
Тема Vectors in Pl/PgSQL
Дата
Msg-id 993DBE5B4D02194382EC8DF8554A5273033549@postoffice.waterford.org
обсуждение исходный текст
Ответы Re: Vectors in Pl/PgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I am trying to build a join condition to join to tables with identical schemas on their unique index attributes.
So, I run a query that returns me the int2vector values from pg_index, which contains column indexes on which unique index is built. There can be multiple unique indexes built on each table, so I open a cursor and got through each int2vector returned by the query.
Now, I need to traverse through this int2vector and build the join condition. The problem is to acces elements in each int2vector withing pgsql. When I try the following, the program crashes at run-time saying that '[' is not allowed.
The cursor is called uind_curs and int2vector column is called indkey.
 
-- fetch next vector
FETCH uind_curs INTO rec;
EXIT WHEN NOT FOUND; 
i := 0;
LOOP 
    EXIT WHEN rec.indkey[i] IS NULL;
    RAISE NOTICE ''uind col: %'', rec.indkey[i];
    i := i + 1;
END LOOP;
 
I couldn't find any documentation on using vectors in pl/pgsql.
Any help would be greately appreciated! 
 
Thanks.
 
Oleg

*************************************

This email may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Any review, copying, printing, disclosure or other use is prohibited.
We reserve the right to monitor email sent through our network.

*************************************

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

Предыдущее
От: Scott Lamb
Дата:
Сообщение: ident auth not working on 7.3.1
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: ident auth not working on 7.3.1