Skip site navigation (1) Skip section navigation (2)

BUG #5514: no relation entry for relid X

From: "Marcos Castedo" <marcos(dot)castedo(at)anachronics(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5514: no relation entry for relid X
Date: 2010-06-20 22:02:41
Message-ID: 201006202202.o5KM2fue093245@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5514
Logged by:          Marcos Castedo
Email address:      marcos(dot)castedo(at)anachronics(dot)com
PostgreSQL version: 8.4.4
Operating system:   GNU/Linux
Description:        no relation entry for relid X
Details: 

Hi,

I'm getting an error in some kind of SQL expression (subquery referencing a
tuple from parent expression).
This error raise in 8.4.x version of postgres, but previous version (8.3.x)
execute the expression correctly.

Examples:

CREATE TABLE table_a
(
id integer primary key
);

CREATE VIEW view_a as select * FROM table_a;

SELECT (SELECT view_a) FROM view_a;

PostgreSQL 8.3.9 (works fine):

postgres=# SELECT (SELECT view_a) FROM view_a;
 ?column?
----------
(0 rows)

postgres=# INSERT INTO table_a VALUES (1);

postgres=# SELECT (SELECT view_a.*) FROM view_a;
 ?column? 
----------
        1

postgres=# SELECT (SELECT (view_a.*)::text) FROM view_a;
 ?column? 
----------
 (1)
(1 row)


PostgreSQL 8.4.4 (ERROR:  no relation entry for relid x):

postgres=# SELECT (SELECT view_a) FROM view_a;
ERROR:  no relation entry for relid 1

postgres=# INSERT INTO table_a VALUES (1);

postgres=# SELECT (SELECT (view_a.*)::text) FROM view_a;
ERROR:  no relation entry for relid 1

postgres=# SELECT (SELECT view_a.*) FROM view_a;
 ?column? 
----------
        1

postgres=# SELECT (SELECT (a.*)::text) FROM view_a a;
ERROR:  no relation entry for relid 1


Best regards

Responses

pgsql-bugs by date

Next:From: Joshua TolleyDate: 2010-06-20 22:34:07
Subject: Re: BUG #5513: High availability with Postgres
Previous:From: Craig RingerDate: 2010-06-20 17:36:20
Subject: Re: BUG #5512: Password error message

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group