Bug in 8.2B1 plpgsql ...

From: James Robinson <jlrobins(at)socialserve(dot)com>
To: Hackers Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug in 8.2B1 plpgsql ...
Date: 2006-10-25 16:20:55
Message-ID: 65B31E22-4073-4DC3-817F-22CB533F798A@socialserve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seems that plpgsql in 8.2B1 thinks that selects of the form ' ....
and foo not in (select ... )' should be function calls, not
subselects. These worked fine in 8.1.

Here's a smallish script which reproduces the problem on 8.2RC1 / OSX:

If you comment out the 'and NEW.id not in (select t1_id from
skip_t1_ids) ' clause in the trigger, then the script completes.

social=# \i 8.2.bug.sql
BEGIN
psql:8.2.bug.sql:15: NOTICE: CREATE TABLE / PRIMARY KEY will create
implicit index "t1_pkey" for table "t1"
CREATE TABLE
CREATE TABLE
CREATE SEQUENCE
CREATE TABLE
CREATE FUNCTION
CREATE TRIGGER
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
psql:8.2.bug.sql:52: ERROR: cache lookup failed for function 0
CONTEXT: SQL statement "SELECT $1 <> $2 and $3 not in (select
t1_id from skip_t1_ids)"
PL/pgSQL function "track_t1_changes" line 2 at if
ROLLBACK

Attachment Content-Type Size
8.2.bug.sql application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Troy 2006-10-25 16:24:20 Re: Replication documentation addition
Previous Message David Fetter 2006-10-25 16:20:21 Re: [HACKERS] Replication documentation addition