Array in stored procedure - Mailing list pgsql-general

From Michal Hlavac
Subject Array in stored procedure
Date
Msg-id 401E0C53.8010608@medium13.sk
Whole thread Raw
Responses Re: Array in stored procedure
List pgsql-general
DECLARE
   groups integer[];
   tmp RECORD;
   tmpi integer;
BEGIN
   FOR tmp IN SELECT i_group_id FROM l_group_to_user WHERE i_user_id =
$1 LOOP
     SELECT i_group_id INTO tmpi FROM s_group WHERE i_group_id =
tmp.i_group_id;
     groups[] := tmpi;
     RETURN NEXT tmp.i_group_id;
   END LOOP;
   RETURN NULL;
END

hello,

I am using v7.3.5. I cannot fill and use array "groups". It is possible
in stored procedures???
Row: groups[] := tmpi;
returns error: syntax error at or near "["
thanx... miso

pgsql-general by date:

Previous
From: Együd Csaba
Date:
Subject: How to kick out automatically stuck in queries
Next
From: Kris Jurka
Date:
Subject: Re: How to kick out automatically stuck in queries