Re: [BUGS] PostgreSQL 8.2 Bug in casting varchar to int in SELECT ... WHERE IN ( ... )

2007-10-19 Thread Tom Lane
"Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > What troubles me here is that surprise factor is unusally high here. > While I understand mechanics why IN (1) works while IN (1,2) does not, > I think random developers are going to be confused. If you're not testing against 8.3 then this argument do

Re: [BUGS] PostgreSQL 8.2 Bug in casting varchar to int in SELECT ... WHERE IN ( ... )

2007-10-19 Thread Dawid Kuroczko
On 10/19/07, Tom Lane <[EMAIL PROTECTED]> wrote: > "Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > > Note that neither SELECT will work on 8.3, because we no longer have an > > implicit cast from integer to text. I suppose the above is an oversight > > in how we handle IN-clauses (starting with

Re: [BUGS] PostgreSQL 8.2 Bug in casting varchar to int in SELECT ... WHERE IN ( ... )

2007-10-19 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > Note that neither SELECT will work on 8.3, because we no longer have an > implicit cast from integer to text. I suppose the above is an oversight > in how we handle IN-clauses (starting with 8.2 an IN-clause is > transformed into an "x = ANY (...)"

Re: [BUGS] PostgreSQL 8.2 Bug in casting varchar to int in SELECT ... WHERE IN ( ... )

2007-10-19 Thread Heikki Linnakangas
Dawid Kuroczko wrote: > Versions 8.0, 8.1 work fine, while version 8.2.5 (and earlier probably too): > > postgres=> CREATE TEMP TABLE test (id varchar(32)); > CREATE TABLE > postgres=> INSERT INTO test SELECT * FROM generate_series(1,100); > INSERT 0 100 > postgres=> SELECT * FROM test WHERE id IN

[BUGS] PostgreSQL 8.2 Bug in casting varchar to int in SELECT ... WHERE IN ( ... )

2007-10-19 Thread Dawid Kuroczko
Versions 8.0, 8.1 work fine, while version 8.2.5 (and earlier probably too): postgres=> CREATE TEMP TABLE test (id varchar(32)); CREATE TABLE postgres=> INSERT INTO test SELECT * FROM generate_series(1,100); INSERT 0 100 postgres=> SELECT * FROM test WHERE id IN (50); id 50 (1 row) postgre

Re: [BUGS] creating a table with a serial column sets currval

2007-10-19 Thread Tom Lane
Kris Jurka <[EMAIL PROTECTED]> writes: > On Thu, 18 Oct 2007, Tom Lane wrote: >> It's not that it gets put in the cache, it's that read_info gets called >> (setting elm->increment). I think we probably should clean this up by >> creating a separate flag in that struct that explicitly says "currval

[BUGS] Fwd: Stalled post to pgsql-bugs

2007-10-19 Thread Ciprian Dorin Craciun
Hello all! Almost two months ago I have posted a bug on the bug reporting form that is available on the web page... (I forward here the email I got in response.) It was related about the RETURNING feature available for INSERT, UPDATE and DELETE, and the fact that I can not use it as last s