Re: Open items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>
Subject: Re: Open items
Date: 2004-08-05 19:00:40
Message-ID: 20163.1091732440@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jonathan Gardner <jgardner(at)jonathangardner(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-05 19:14:55 Re: NULL pointer crashes hashname()
Previous Message Gaetano Mendola 2004-08-05 17:22:34 Re: No such file or directory during PITR