Stepping through cursors - Mailing list pgsql-general

From Oleg Lebedev
Subject Stepping through cursors
Date
Msg-id 993DBE5B4D02194382EC8DF8554A52730334E9@postoffice.waterford.org
Whole thread Raw
List pgsql-general
I opened a cursor and trying to step through it. The problem I came across is how to check whether the end of the cursor have been reached, smth like "if (rec%NOTFOUND)" in Oracle. Any ideas how to do this gracefully without running an sql query to find out the size of the cursor record set?
BTW, is there any other way to step through records returned by a dynamic query. For example, suppose I have a query "select col_name from table_name", where col_name and table_name are passed as a parameter to a procedure. I want to step through the result of this query and put all values in the column in a coma-separated array.
Thanks.
 
Oleg

pgsql-general by date:

Previous
From: Joe Murphy
Date:
Subject: Vacuum and indexes problem
Next
From: Steve
Date:
Subject: Literal dash in regular expression brackets