Are PostgreSQL functions that return sets or tables evaluated lazily or eagerly?

2020-01-03 Thread Gerald Britton
had to cancel it after several seconds -- way more than to just return the first row) That leads me to ask: If (and under what circumstances) PostgreSQL evaluates functions lazily (returning rows as requested by the caller) or eagerly (evaluation all rows before returning the first one)? -- Gera

Re: Are PostgreSQL functions that return sets or tables evaluated lazily or eagerly?

2020-01-05 Thread Gerald Britton
0 at 10:07 PM Andrew Gierth wrote: > >>>>> "Gerald" == Gerald Britton writes: > > Gerald> That leads me to ask: > > Gerald> If (and under what circumstances) PostgreSQL evaluates > Gerald> functions lazily (returning rows as requested by the

Determine actual type of a pseudo-type argument

2020-01-05 Thread Gerald Britton
If I use a pseudo-type in the argument list of a function definition (SQL or plpgsql), how can I determine the actual type used a runtime? -- Gerald Britton, MCSE-DP, MVP LinkedIn Profile: http://ca.linkedin.com/in/geraldbritton

Re: Determine actual type of a pseudo-type argument

2020-01-05 Thread Gerald Britton
> Steve > > On Mon, Jan 6, 2020 at 9:34 AM Gerald Britton > wrote: > >> If I use a pseudo-type in the argument list of a function definition (SQL >> or plpgsql), how can I determine the actual type used a runtime? >> >> -- >> Gerald Britton, MCSE-DP, MVP >> LinkedIn Profile: http://ca.linkedin.com/in/geraldbritton >> >

Re: Are PostgreSQL functions that return sets or tables evaluated lazily or eagerly?

2020-01-19 Thread Gerald Britton
Love to see "return next" work like python yield! Anyone working on that? On Sun, Jan 5, 2020, 5:46 PM Tom Lane wrote: > Gerald Britton writes: > > Back to where I started in my top post: I became interested in this due > to > > the doc note on returning a