At 2004-06-18 13:11:19 -0400, tgl@sss.pgh.pa.us wrote:
>
> > Would anyone be interested in a patch to allow this?
>
> Yes, but not the way you suggest. The ... approach forces calling
> code to know *when it is written* how many result columns there will
> be, because you'd have to actually write that number of parameters in
> the call.
I suspect I didn't explain my proposal sufficiently well.
The signature of, say, PQexecParams does get ... added on to it, but new
callers pass in only a count and an array, not one argument per expected
result. That way, existing callers would continue to compile without any
changes, and new code tells the function to look for the extra arguments
by specifying a currently-invalid value for the resultFormat parameter.
That said, however:
> No one's gotten around to thinking about a more general redesign of
> libpq's query API yet, but I'd rather see us do that than put more
> warts on the functions we have ...
I am in complete agreement with that sentiment.
-- ams