Search Postgresql Archives

Re: Writing SRF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jorge Arevalo <jorgearevalo@xxxxxxxxxxxx> writes:
> I'm writing a SRF following the example from
> http://www.postgresql.org/docs/8.4/interactive/xfunc-c.html (section
> 34.9.10). In the example, in the code executed in first call, we get
> the number of tuples to be returned, and no more. Then, in each call,
> a new tuple is allocated and returned, until reach max_calls.

You don't have to do it that way, by any means.  max_calls is just
a field you can use if you feel like it --- it's not going to be
looked at by anything outside your SRF.  If you don't want to determine
the number of result rows at the start, just ignore max_calls, and
use whatever method is convenient to decide that you're done
returning rows.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux