Re: C function accepting/returning cstring vs. text - Mailing list pgsql-hackers

From James William Pye
Subject Re: C function accepting/returning cstring vs. text
Date
Msg-id 200D6373-315D-440A-B28D-739D5FC5ABC6@jwp.name
Whole thread Raw
In response to Re: C function accepting/returning cstring vs. text  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
On Jan 27, 2010, at 1:00 PM, Joe Conway wrote:
> Implementing true value_per_call is still something on my TODO list, but
> obviously has not risen to a very high priority for me as it has now
> been an embarrassing long time since it was put there. But that said,
> materialize mode has proven extremely good at covering the most common
> use cases with acceptable performance.

Hrm. I think this has been noted before, but one of the problems with VPC is that there can be a fairly significant
amountof overhead involved with context setup and teardown--especially with PLs. If you're streaming millions of rows,
it'sno longer a small matter. 

I would think some extension to Tuplestore would be preferable. Where chunks of rows are placed into the Tuplestore on
demandin order to minimize context setup/teardown overhead. That is, if the Tuplestore is empty and the user needs more
rows,invoke the procedure again with the expectation that it will dump another chunk of rows into the container. Not a
formalspecification by any means, but I'm curious if anyone has considered that direction. 

Or along the same lines, how about a valueS-per-call mode? =)

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: CommitFest status summary 2010-01-27
Next
From: Ivan Sergio Borgonovo
Date:
Subject: Re: C function accepting/returning cstring vs. text