Unix Technical Forum

BUG #1692: Drop table in plpgsql

This is a discussion on BUG #1692: Drop table in plpgsql within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1692 Logged by: Jocelyn Turcotte Email address: turcotte.j@gmail.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:53 AM
Jocelyn Turcotte
 
Posts: n/a
Default BUG #1692: Drop table in plpgsql


The following bug has been logged online:

Bug reference: 1692
Logged by: Jocelyn Turcotte
Email address: turcotte.j@gmail.com
PostgreSQL version: 8.0.3
Operating system: Debian linux 1:3.3.5-12
Description: Drop table in plpgsql
Details:

I dont know if this bug is known (it seems to be a bug though), did not find
the todo list on the site.
If I execute the folowing code I get the error:

ERROR: relation with OID 3374698 does not exist
CONTEXT: SQL statement "INSERT INTO tmp values (1)"
PL/pgSQL function "bugtest" line 8 at SQL statement

Code:

CREATE OR REPLACE FUNCTION bugtest() returns integer as $proc$
DECLARE
yo record;
BEGIN
CREATE TEMP TABLE tmp (
col INTEGER
) ON COMMIT DROP;

INSERT INTO tmp values (1);

select into yo col from tmp;

DROP TABLE tmp;
RETURN 0;
END;
$proc$ language plpgsql;

select bugtest();
select bugtest();

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:53 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1692: Drop table in plpgsql

On Tue, May 31, 2005 at 07:58:50PM +0100, Jocelyn Turcotte wrote:
>
> ERROR: relation with OID 3374698 does not exist
> CONTEXT: SQL statement "INSERT INTO tmp values (1)"
> PL/pgSQL function "bugtest" line 8 at SQL statement


See "Why do I get 'relation with OID ##### does not exist' errors
when accessing temporary tables in PL/PgSQL functions?" in the FAQ:

http://www.postgresql.org/docs/faqs.FAQ.html#4.19

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com