Re: Determine actual type of a pseudo-type argument

2020-01-05 Thread Gerald Britton
E.g. anyelement, anyenum, anyarray are in a table of pseudo types in the official docs. I'll try pg_typeof...looks like a possibility. On Sun, Jan 5, 2020, 5:37 PM Steve Baldwin wrote: > I'm not sure what you mean by pseudo-type, but does the pg_typeof() > function help? > > Steve > > On Mon, J

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

2020-01-05 Thread Tom Lane
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 cursor and that it can be an efficient way to > handle large result sets. I suppose that implies lazy evaluation. Does > that mean that if I need plpgsql for a funct

Re: Determine actual type of a pseudo-type argument

2020-01-05 Thread Steve Baldwin
I'm not sure what you mean by pseudo-type, but does the pg_typeof() function help? 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? > > -- > G

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: Are PostgreSQL functions that return sets or tables evaluated lazily or eagerly?

2020-01-05 Thread Gerald Britton
Thank you all for the detailed explanations. I think the most disappointing is this bit: > > > 2. Table function called in the FROM clause > Table functions in the FROM clause, e.g. SELECT ... FROM myfunc(); > are always evaluated eagerly. Which more or less matches my toy example. OTOH Tom men