How iterate records

From: Jan Poslusny <pajout(at)gingerall(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: How iterate records
Date: 2005-02-22 11:20:07
Message-ID: 421B1567.8090108@gingerall.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have a problem of plpgsql usage. When I iterate through dynamic query, like this:

FOR my_/record/ IN EXECUTE /text_expression/ LOOP
/statements/
END LOOP;

I am not able to construct expression, which can get value for each 'item' of my_record, something like my_record[3] or get_item(my_record, 3), without knowledge about real names of record pieces. I know that it is not the goal of this language, but my goal is to implement some lite functions returning XML rather then something else...

pajout

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-02-22 11:20:16 Re: rows and array
Previous Message FERREIRA William (COFRAMI) 2005-02-22 10:17:16 rows and array