plpgsql & temp table -bug - Mailing list pgsql-bugs

From Szima Gabor
Subject plpgsql & temp table -bug
Date
Msg-id Pine.LNX.4.04.10109101939001.15827-100000@cyberstorm.opht.dote.hu
Whole thread Raw
Responses Re: plpgsql & temp table -bug  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
Hello!

-----------------------------------------------------
> createdb test
CREATE DATABASE
> createlang plpgsql test
> psql test
Welcome to psql, the PostgreSQL interactive terminal.

create function testcnt () returns int4 as '
declare
    rp  int4;
begin
    select count(*) into rp from test_tmp;
    return rp;
end;
' language 'plpgsql';

CREATE

test=# create temp table test_tmp (gk int4);
CREATE
test=# insert into test_tmp (gk) values (1);
INSERT 3493039 1
test=# select testcnt();
testcnt
---------
       1
(1 row)

test=# drop table test_tmp;
DROP
test=# select testcnt();
ERROR:  Relation 3493029 does not exist

:)

Table-OID are cached and not flushed after DROP TABLE?
...

-----------------------------------------------------------------

PostgreSQL 6.5.3/7.0.3/7.1.12
SuSE 6.4
Linux-2.2.18


                                -Sygma

pgsql-bugs by date:

Previous
From: "Jean-Michel.chabanne"
Date:
Subject: libpd - PQfinish() - crashes client application in some cases
Next
From: Tomasz Myrta
Date:
Subject: dynamic date