Re: Operations widh CURSORS
От | Jurgen Defurne |
---|---|
Тема | Re: Operations widh CURSORS |
Дата | |
Msg-id | 39389E4F.A907ECA8@glo.be обсуждение исходный текст |
Ответ на | Operations widh CURSORS (Marcos Barreto de Castro <mbdecastro@yahoo.com>) |
Список | pgsql-general |
Marcos Barreto de Castro wrote: > Hi, > > Is it possible to declare 2 cursors in the same > transaction? > I am issuing a "BEGIN WORK" statement, after that I > am issuing "DECLARE c_cursor FOR SELECT * FROM table". > When, after that, I issue "DECLARE c_cursor1 FOR > SELECT COUNT(*) FROM table" I get a segmentation > fault. > Is there a way to avoid this and still be able to > open 2 cursors in the same transaction? > Thanks a lot. > > Marcos Castro > email: mbdecastro@yahoo.com > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos -- now, 100 FREE prints! > http://photos.yahoo.com You do not need to declare your cursors inside your transaction. A cursor is like a kind of data structure : you declare it and then you use it at will whenever you need it. <Declare cursors here> BEGIN WORK; -- Open cursors here -- Work with cursors here -- COMMIT or ROLLBACK, depending on the outcome of your program Jurgen Defurne defurnj@glo.be
В списке pgsql-general по дате отправления: