Jonathan Gardner <jgardner@jonathangardner.net> writes:
> (1) What's the purpose of specifying the params if it is going to figure it
> out on its own?
It may not be able to pick an unambiguous type for an unspecified param.
Consider for instance "SELECT abs($1)". There isn't any principled way
to pick which of the abs() functions is meant.
> (2) What happens when I specify a different number of params than what is in
> the query string?(3 params in query, but 4 specified, or 2 params in query,
> but 1 specified.)
The former case: the param goes unused; the latter: you get an error.
> (2) How do I specify something like this:
> 1. Param 1 is an int.
> 2. Param 2 is unknown - figure it out.
> 3. Param 3 is a varchar.
23, 0, 1043 ...
regards, tom lane