BUG #5472: Postgres hard crash in ...WHERE IN (SELECT * FROM (VALUES (),...) AS t(col)) - Mailing list pgsql-bugs

From Vlad Romascanu
Subject BUG #5472: Postgres hard crash in ...WHERE IN (SELECT * FROM (VALUES (),...) AS t(col))
Date
Msg-id 201005251639.o4PGdiUX006783@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5472: Postgres hard crash in ...WHERE IN (SELECT * FROM (VALUES (),...) AS t(col))  (Alex Hunsaker <badalex@gmail.com>)
Re: BUG #5472: Postgres hard crash in ...WHERE IN (SELECT * FROM (VALUES (),...) AS t(col))  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5472
Logged by:          Vlad Romascanu
Email address:      vromascanu@accurev.com
PostgreSQL version: 8.4.3
Operating system:   Windows, Linux
Description:        Postgres hard crash in ...WHERE <bigint_col> IN (SELECT
* FROM (VALUES (<int_value>),...) AS t(col))
Details:

The following reproducibly crashes Postgres 8.4.3 (segfault) inside
int84eq() on both Windows and Linux, but works just fine in 8.3.4:

CREATE TABLE t1 (
  col1 bigint NOT NULL,
  col2 integer NOT NULL,
  CONSTRAINT t1_pkey PRIMARY KEY (col1, col2)
);

INSERT INTO t1 (col1, col2) VALUES (0,1),(1,2),(2,3);

SELECT col1, col2 FROM t1 WHERE col1 IN ( SELECT * FROM (VALUES (1),(2)) AS
t2(col1) )

Changing the above to...

SELECT col1, col2 FROM t1 WHERE col1::integer IN ( SELECT * FROM (VALUES
(1),(2)) AS t2(col1) )

...works again.

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: BUG #5468: Pg doesn't send accepted root CA list to client during SSL client cert request
Next
From: Tom Lane
Date:
Subject: Re: BUG #5468: Pg doesn't send accepted root CA list to client during SSL client cert request