Port Bug Report: executing a CREATE TABLE statement from a PL/pgSQL script crashes the backend

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: executing a CREATE TABLE statement from a PL/pgSQL script crashes the backend
Date: 1999-06-01 10:48:07
Message-ID: 199906011048.GAA49788@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Maarten Hazewinkel
Your email address : hazewinkel(at)bortiboll(dot)com

Category : runtime: back-end
Severity : serious

Summary: executing a CREATE TABLE statement from a PL/pgSQL script crashes the backend

System Configuration
--------------------
Operating System : RedHat Linux 5.2

PostgreSQL version : 6.4.2

Compiler used : gcc 2.7.2.3

Hardware:
---------
Pentium 166, 32 MB, 1G harddisk

Versions of other tools:
------------------------
gmake 3.76.1
flex 2.5.4

--------------------------------------------------------------------------

Problem Description:
--------------------
I am trying to write a PL/pgSQL function to do a lot of processing on my database. To store intermediate results, I want to create a temporary table within the function, and dispose of it at the end. Unfortunately, whatever I try, it crashes the backend. The system messages log has this to say about it:

NOTICE: Message from PostgreSQL backend:
^IThe Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
^II have rolled back the current transaction and am going to terminate your database system connection and exit.
^IPlease reconnect to the database system and repeat your query.

--------------------------------------------------------------------------

Test Case:
----------
CREATE FUNCTION table_text () RETURNS text as '
BEGIN
CREATE TABLE "temp2" ("tempid" int4);
RETURN ''finished'';
END;
SELECT table_test();

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message Kapoor, Nishikant X 1999-06-01 14:40:45 RE: [PORTS] AIX-4.2.1 binaries ? more info. PLEASE !
Previous Message Unprivileged user 1999-06-01 02:43:19 Port Bug Report: fatal error occurs while building index