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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to