basic temp table question

From: "L(dot) Fletcher" <lucasf(at)vagabond-software(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: basic temp table question
Date: 2005-03-02 00:04:33
Message-ID: 011201c51ebb$6a4d36d0$a001a8c0@sf.vagabond.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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...

Browse pgsql-general by date

  From Date Subject
Next Message L. Fletcher 2005-03-02 00:06:48 basic temp table question
Previous Message Kris Jurka 2005-03-01 23:49:38 Re: JDBC and Portals . Clarification