Re: Query that will not run a ValuePerCall SRF to completion? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Query that will not run a ValuePerCall SRF to completion?
Date
Msg-id 3723866.1633218265@sss.pgh.pa.us
Whole thread Raw
In response to Query that will not run a ValuePerCall SRF to completion?  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> I'm having difficulty coming up with a query that actually doesn't
> run the SRF to completion.

From memory, nodeFunctionscan always populates the tuplestore immediately.
I've looked into changing that but not got it done.

If you write the function in the targetlist, ie

    select srf(...) limit N;

I think it will act more like you expect.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Query that will not run a ValuePerCall SRF to completion?
Next
From: Tom Lane
Date:
Subject: Re: 002_types.pl fails on some timezones on windows