Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1acxED-0006Tq-98 for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Mar 2016 15:37:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1acxEC-0003IO-S4 for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Mar 2016 15:37:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1acujh-0007gi-4j for pgsql-bugs@postgresql.org; Mon, 07 Mar 2016 12:58:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1acujd-0004wx-Fd for pgsql-bugs@postgresql.org; Mon, 07 Mar 2016 12:58:07 +0000 MIME-Version: 1.0 Subject: BUG #14003: Error "could not open relation with OID 18152875" To: pgsql-bugs@postgresql.org From: g.jalmi@tcs.com Date: Mon, 07 Mar 2016 12:57:37 +0000 Message-ID: <20160307125737.25731.19550@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 14003 Logged by: Ganesh Jalmi Email address: g.jalmi@tcs.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" -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs