Re: Number of rows in a cursor ?
От | |
---|---|
Тема | Re: Number of rows in a cursor ? |
Дата | |
Msg-id | B74B7433CDDD2C4AA41D94832E32E19D92EE9A@EMEXM1112.dir.svc.accenture.com обсуждение исходный текст |
Ответ на | Number of rows in a cursor ? (Bo Lorentsen <bl@netgroup.dk>) |
Ответы |
Re: Number of rows in a cursor ?
|
Список | pgsql-sql |
You cannot count the number of rows in a cursor, unfortunately. I recently ran in to this problem. As far as I am aware, the only way to count them is to either iterate through them, or if you are only expecting one or two, perform multiple FETCHES and test if the record set returned is empty. http://archives.postgresql.org/pgsql-sql/2005-08/msg00208.php OPEN cur_overlap FOR EXECUTE 'SELECT *, ....'; FETCH cur_overlap INTO row_one; FETCH cur_overlap INTO row_two; IF (row_two.id IS NULL) THEN .... King regards, Neil. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other useof the email by you is prohibited.
В списке pgsql-sql по дате отправления: