vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > ... c) would be very bad since it > doesn't give me any chance to release the resources that > where used in order to produce the rows. You are supposed to free resources used to produce the rows before srf_return_next(); The actual rows are pfree()'d by pg. (an dso are any other palloc()'d resources, but I'd recommend freeing them anyway, especially if youre going to use the function in an index or transactions, since resources a not freed till the end of the transaction) .... JOhn ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |
| ||||
| John, >You are supposed to free resources used to produce the rows before srf_return_next(); > > I can (and must) free up the resources used to produce one single row at that time yes, but I might have resources that is common to all rows. Let's assume that I have a file open for instance. I read one row at a time from that file. I need to know when to close the file. Regards, Thomas Hallgren ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
| Thread Tools | |
| Display Modes | |
|
|