Re: BUG #2811: Error determining param type in prepared statement of unused variable - Mailing list pgsql-bugs

From Ross Cohen
Subject Re: BUG #2811: Error determining param type in prepared statement of unused variable
Date
Msg-id 20061206234804.GW2749@snurgle.org
Whole thread Raw
In response to Re: BUG #2811: Error determining param type in prepared statement of unused variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #2811: Error determining param type in prepared statement of unused variable
List pgsql-bugs
On Wed, Dec 06, 2006 at 05:55:32PM -0500, Tom Lane wrote:
> "Ross Cohen" <rcohen@snurgle.org> writes:
> > PREPARE demo (unknown) AS SELECT 1;
> > ERROR:  could not determine data type of parameter $1
>
> This doesn't seem like a bug to me.  The parser needs to be able to
> resolve the types of any unknown parameters, and you've not given it
> enough information to do that.

It's not a bug, it's a feature request. It doesn't really need to be able
to resolve the type because the parameter will never be used. Yes, I'm being
lazy, it's possible for me to be more careful about what I pass in. On the
other hand, I think others would appreciate the ability to be this lazy,
as well.

Ross

pgsql-bugs by date:

Previous
From:
Date:
Subject: Re: BUG #2812: Transaction is aborted after error
Next
From: Tom Lane
Date:
Subject: Re: BUG #2811: Error determining param type in prepared statement of unused variable