[GENERAL] Row fields by position in a cursor

2005-03-01 Thread Mike Preston
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 syn

[GENERAL] Field count in a RECORD variable - plpgsql

2005-03-01 Thread Mike Preston
I am building a generic crosstab function in plpgsql, where I can pass in a SQL statement and return back the data pivoted with the values of one column serving as headers of the return columns.  If I use a RECORD variable to scroll through the data, is there a way for me to tell the number o