pl/pgsql FOR LOOP with function

From: "David Legault" <legault(dot)david(at)gmail(dot)com>
To: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: pl/pgsql FOR LOOP with function
Date: 2007-03-10 19:13:00
Message-ID: e0b20d410703101113s6993205eo97ccb8b2fe05285b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

How can I return the contents of the row object without knowing the names of
the parameters in it ? I'd like to do something like row[1] or something
similar. Or is there a way to actually get the values knowing the return
type but not the name?

FOR row IN SELECT * FROM getgroups(usr) LOOP

.. snip ..

END LOOP;

when

FUNCTION getgroups(usr name) RETURNS SETOF name AS

Thanks

David

Browse pgsql-general by date

  From Date Subject
Next Message CAJ CAJ 2007-03-10 19:40:21 Upgrading Postgres large databases with blobs
Previous Message David Legault 2007-03-10 19:01:17 Re: HIPPA (was Re: Anyone know ...)