BUG #14003: Error "could not open relation with OID 18152875"

From: g(dot)jalmi(at)tcs(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14003: Error "could not open relation with OID 18152875"
Date: 2016-03-07 12:57:37
Message-ID: 20160307125737.25731.19550@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14003
Logged by: Ganesh Jalmi
Email address: g(dot)jalmi(at)tcs(dot)com
PostgreSQL version: 9.1.14
Operating system: CentOS release 6.5
Description:

DB : "PostgreSQL 9.1.14 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit"

Scenario: A temporary table is created within a function where no schema
name is specefied for the table. This table is created using dynamic sql.
--------------------
v_out_data:='temp_table_'||to_char(current_timestamp,'DDMMYYHHMISS');
v_sel_query := 'create temporary table '||v_out_data||'(segment character
varying,Market_mod_type character varying,min_date date, max_date date,
all_ist character varying, service_type character varying, cur_data
character varying, error_message text, error_code integer)';
execute(v_sel_query);
-------------------------------
Next a cursor is opened on with select clause dynamically on one of
internal table.
Based on cursor conditions records gets inserted into the Temporary
Table.
close the cursor
return all records from temporary table and then drop the temorary
table.
------------------------------------

return query
execute('select * from '||v_out_data);
execute('drop table '||v_out_data);

------------------------------------
while executing drop table command we geet the error "could not open
relation with OID 18152875"

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-03-07 15:41:47 Re: BUG #14001: pg_ctl error output empty/faulty
Previous Message Michael Paquier 2016-03-07 10:48:54 Re: BUG #14001: pg_ctl error output empty/faulty