Stepping through cursors

Поиск
Список
Период
Сортировка
От Oleg Lebedev
Тема Stepping through cursors
Дата
Msg-id 993DBE5B4D02194382EC8DF8554A52730334E9@postoffice.waterford.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Joe Murphy
Дата:
Сообщение: Vacuum and indexes problem
Следующее
От: Steve
Дата:
Сообщение: Literal dash in regular expression brackets