Iterating over an varchar array?

From: "Marcos Iuato" <iuato(at)samurai(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Iterating over an varchar array?
Date: 2004-05-25 16:42:24
Message-ID: 2851.192.168.0.251.1085503344.squirrel@mail.samurai.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to iterate over an varchar array using plpgsql but i get the
this error:

Error: missing .. at the end of SQL expression

My Table:

TABLE1(
Cars VARCHAR[]
)

My Code

Declare
mycars varchar[];
car varchar;
Begin
For car in SELECT cars from table1 LOOP
RAISE Notice "CAR: %", car
END Loop;
END;

Resume, i have a column with a list of varchar type and i would like to
iterate over this array, is this possible?

Thanks,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leandro Guimaraens Faria Corsetti Dutra 2004-05-25 17:35:52 Re: Ingres to be released as open source
Previous Message Tom Lane 2004-05-25 15:07:51 Re: restore from a pg_dumpall file