Row fields by position in a cursor

From: "Mike Preston" <MPreston(at)mosscodilis(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Row fields by position in a cursor
Date: 2005-03-01 20:48:45
Message-ID: s22472d4.026@mail.mosscodilis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am passing a SQL statement to a function as a parameter and then
executing it via a call like

OPEN curs1 FOR EXECUTE sql_str;

Since I won't know in advance the fieldnames being passed by the SQL
string, I'd like to dereference the column fields by position. Can
anybody tell me the syntax for doing this? Doesn't seem to be much
documentation on dereferencing info returned by a cursor. I can fetch
into either a record variable or a row variable, whichever works.

TIA,
Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Romagnoli 2005-03-01 21:23:03 Novice Question
Previous Message Brian Maguire 2005-03-01 20:37:09 pgpool