Re: Open items - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Open items
Date
Msg-id 20163.1091732440@sss.pgh.pa.us
Whole thread Raw
In response to Re: Open items  (Jonathan Gardner <jgardner@jonathangardner.net>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Jonathan Gardner
Date:
Subject: Re: Open items
Next
From: Tom Lane
Date:
Subject: Re: NULL pointer crashes hashname()