Skip site navigation (1) Skip section navigation (2)

Parse message problem, maybe a bug?

From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Parse message problem, maybe a bug?
Date: 2004-09-25 01:43:05
Message-ID: 4154CD29.709@yahoo.com.br (view raw or flat)
Thread:
Lists: pgsql-hackers

Hi all,

Martijn, a user of Npgsql, sent me a query which is giving problems with 
postgresql using extended query mode.

The problem I'm having is in the Parse message. The parse message I'm 
sending is as follow:


select * from table where $1 in (select some_field from table)

Postgresql returns this error:

could not determine data type of parameter $1
Severity: ERROR
Code: 42P18


But I already have many working samples in the form for example:

insert into table(field1, field2) values ($1, $2)


The only way I could have it working was by adding the explicit type of 
parameter so the parse text is, for example for parameter of type text:


select * from table where $1::text in (select some_field from table)


Is this a bug in Postgresql or is this by design?


Thanks in advance.


Regards,

Francisco Figueiredo Jr.


pgsql-hackers by date

Next:From: Rod TaylorDate: 2004-09-25 02:03:36
Subject: Possible Optimization?
Previous:From: Jan WieckDate: 2004-09-25 01:32:30
Subject: Re: 7.4.5 losing committed transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group