Search Postgresql Archives

basic temp table question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
 
The first time I run a query against this function (using Npgsql):
 
declare
       r_cursor1 cursor for
 
       SELECT * from tmp_table;
 
begin
 
       CREATE TEMPORARY TABLE tmp_table
        (
              testcol integer
        ) ON COMMIT DROP;
 
       INSERT INTO tmp_table
       SELECT 0;
 
       open r_cursor1;
 
       return 0;
end;
 
I get this error:
 
ERROR: XX000: relation 1090457025 is still open
 
All subsequent times I get this error:
 
ERROR: 42P01: relation with OID 1090457025 does not exist
 
What am I doing wrong?
 
(Sorry if this is a basic question.)
 
Thanks in advance...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux