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


Your name : Maarten Hazewinkel
Your email address : hazewinkel@bortiboll.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:
---------


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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-ports @
categoriespostgresql
postedJun 1, '99 at 10:48a
activeJun 1, '99 at 10:48a
posts1
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Maarten Hazewinkel: 1 post

People

Translate

site design / logo © 2022 Grokbase