Re: was enhancement of temp tables in plpgsql supposed to apply to temp view?

From: "christopher wood" <chrisj(dot)wood(at)sympatico(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: was enhancement of temp tables in plpgsql supposed to apply to temp view?
Date: 2007-12-01 14:49:12
Message-ID: BLU104-F32A316F829F1ACF9CF1B0E85720@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom,

I reported this bug a few days ago, and did not receive any follow up
e-mail,
but then, by shear coincidence Dean Rasheed referred the following two links
to me.

http://archives.postgresql.org/pgsql-bugs/2007-11/msg00323.php
http://archives.postgresql.org/pgsql-committers/2007-11/msg00584.php

where you asked me for an example and more information. Here it is:

create or replace function tempbug() returns int as $$
declare
val int;
begin
drop view if exists temp_view ;
drop table if exists temp_table cascade;
create temporary table temp_table(a int);
create temporary view temp_view as select * from temp_table;
select count(*) into val from temp_view;
return val;
end;
$$ language plpgsql;

protocal2=> SELECT version();
version
-----------------------------------------------------------------------------------------------------------------
PostgreSQL 8.3beta3 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3
20071014 (prerelease) (Debian 4.2.2-3)
(1 row)

protocal2=> select * from tempbug() ;
tempbug
---------
0
(1 row)

protocal2=> select * from tempbug() ;
ERROR: could not open relation 1663/26373/29539: No such file or directory
CONTEXT: SQL statement "select count(*) from temp_view"
PL/pgSQL function "tempbug" line 8 at SQL statement
protocal2=>

Two questions:
1. Should I not have received an e-mail of your reply, asking for an
example?
2. When I saw your question on
http://archives.postgresql.org/pgsql-bugs/2007-11/msg00323.php , should
there not have been a reply button?

I am (obviously) new to this, but want to help where I can.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-12-01 16:27:34 Re: bug when reload or restart -m smart
Previous Message Architekt Schalbruch 2007-12-01 13:48:27 bug when reload or restart -m smart