BUG #8580: search_path unexpected behavior with pg_temp - Mailing list pgsql-bugs

From bashtanov@imap.cc
Subject BUG #8580: search_path unexpected behavior with pg_temp
Date
Msg-id E1Ve0ZA-0006lF-Gz@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8580
Logged by:          Alexey Bashtanov
Email address:      bashtanov@imap.cc
PostgreSQL version: 9.2.4
Operating system:   Linux Centos 6.4
Description:

[STEPS TO REPRODUCE]
CREATE OR REPLACE FUNCTION foo() RETURNS void
AS $$
begin
  create temporary table zoo () on commit preserve rows;
  delete from zoo;
  drop table zoo;
end;
$$ language plpgsql set search_path = pg_catalog, public, pg_temp;


begin;
select foo();
abort;
begin;
select foo();


[EXPECTED]
no errors
[RECEIVED]
ERROR:  relation "zoo" does not exist
LINE 1: delete from zoo


[ALSO]
1)reproducibility between 50% and 100%
2)also can be reproduced on pg 9.1.9
3)reproduced if replace delete by perform
4)not reproduced if replace delete by alter


Regards,
  Alexey Bashtanov

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #8579: CoreDump of background writer process
Next
From: "Rajagopal C.R"
Date:
Subject: Please send me the steps to install Debugger-Plugin for Postgresql-9.2