Vectors in Pl/PgSQL - Mailing list pgsql-general

From Oleg Lebedev
Subject Vectors in Pl/PgSQL
Date
Msg-id 993DBE5B4D02194382EC8DF8554A5273033549@postoffice.waterford.org
Whole thread Raw
Responses Re: Vectors in Pl/PgSQL
List 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 by date:

Previous
From: Scott Lamb
Date:
Subject: ident auth not working on 7.3.1
Next
From: Oliver Elphick
Date:
Subject: Re: ident auth not working on 7.3.1