Re: Bug in PostGreSQL 8.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hubert FONGARNAND <informatique(dot)internet(at)fiducial(dot)fr>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in PostGreSQL 8.2
Date: 2006-12-06 19:43:05
Message-ID: 364.1165434185@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hubert FONGARNAND <informatique(dot)internet(at)fiducial(dot)fr> writes:
> CREATE TABLE node
> (
> node_id character varying(36) NOT NULL ,
> node_trash integer NOT NULL DEFAULT 0,
> CONSTRAINT pk_node PRIMARY KEY (node_id)
> )
> WITH OIDS;

> select count(*)
> from NODE
> where NODE_ID
> in (select NODE_ID from NODE where NODE_TRASH=3D0 limit 1 offset 0)

OK, it seems the key bit here is that the IN's subselect has a
varchar(N) column ... you don't see the failure unless the subselect
result column has a nondefault typmod. So a possibly helpful workaround
until 8.2.1 comes out is to cast NODE_ID to text in the subselect.

Patch committed; thanks for the report!

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2006-12-06 19:46:48 Re: old synchronized scan patch
Previous Message Tom Lane 2006-12-06 19:40:01 pgsql: Fix planning of SubLinks to ensure that Vars generated from