Re: [BUGS] General Bug Report: TEMP TABLES becomes permanent CATALOG TABLES

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Ricardo Coelho <rcoelho(at)px(dot)com(dot)br>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] General Bug Report: TEMP TABLES becomes permanent CATALOG TABLES
Date: 1999-07-02 00:55:34
Message-ID: 199907020055.UAA15619@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>
> ============================================================================
> POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name : Ricardo Coelho
> Your email address : rcoelho(at)px(dot)com(dot)br
>
> Category : runtime: back-end
> Severity : serious
>
> Summary: TEMP TABLES becomes permanent CATALOG TABLES
>
> System Configuration
> --------------------
> Operating System : RedHat Linux 5.2 Intel
>
> PostgreSQL version : 6.5
>
> Compiler used : gcc
>
> Hardware:
> ---------
> Pentium II 350MHz 128M RAM
>
> Versions of other tools:
> ------------------------
>
>
> --------------------------------------------------------------------------
>
> Problem Description:
> --------------------

> When you execute a wrong SQL command after create a TEMP TABLE,
postgres backend doesn't drop this table after connection ends. We can't
drop pg_temp.PID.N with "drop table" command because it is a system
catalog table. So, we had to dumpall the database, edit db.out file to
erase lines of pg_temp??? create table and reload it again.

>
> --------------------------------------------------------------------------
>
> Test Case:
> ----------
> psql mydb
> mydb=> select * into temp table TMP from anytable;
> mydb=> drop table invalidTable;
> mydb=> \q
> psql mydb
> mydb=> \dS --> You will see a new permanent system table.

I can confirm that this a bug. I am looking at it now. As a
workaround, you can delete the temp tables by starting a postgres
backend with the -O flag to allow system table modifications, and
droping the table.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 1999-07-02 04:03:11 Re: [BUGS] General Bug Report: TEMP TABLES becomes permanent CATALOG TABLES
Previous Message Unprivileged user 1999-07-01 22:20:04 General Bug Report: TEMP TABLES becomes permanent CATALOG TABLES