pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Cc: Tomas Doran <bobtfish@bobtfish.net>
Cc: tdoran@venda.com
Subject: Re: Potential bug in postgres 8.2.4
Date: Thu, 24 May 2007 13:51:15 +0200
Message-ID: <200705241351.15767.peter_e@gmx.net> (raw)
In-Reply-To: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net>
References: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net>

Am Donnerstag, 24. Mai 2007 13:20 schrieb Tomas Doran:
> CREATE TABLE testtable (
>      col1   char(1),
>     data   text
> );

> The following queries all work:
> INSERT INTO testtable (col1, data) VALUES (3::int, 'foobarbazquux');
> SELECT * FROM testtable WHERE col1 = 3::int;
> SELECT * FROM testtable WHERE col1 IN (1);
> SELECT * FROM testtable WHERE col1 IN (1::int);

> However these querys fail on 8.2.4, but work correctly on 8.1:
> SELECT * FROM testtable WHERE col1 IN (1::int, 2::int);
> SELECT * FROM testtable WHERE col1 IN (1, 2);

All of this is strictly speaking incorrect anyway.  And the queries that do 
work will most likely start not working in a future version.  All of this is 
a gradual effort to reduce excessive automatic type casting.

I suggest you fix your application.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



view thread (9+ messages)  latest in thread

Message-ID: <200705241351.15767.peter_e@gmx.net>
Permalink:  ../200705241351.15767.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200705241351.15767.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, bobtfish@bobtfish.net, tdoran@venda.com
  Subject: Re: Potential bug in postgres 8.2.4
  In-Reply-To: <200705241351.15767.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox