Re: The DROP TABLE instruction should have a TEMP option for when a temporary table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bioingbenito(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: The DROP TABLE instruction should have a TEMP option for when a temporary table
Date: 2018-10-20 00:33:20
Message-ID: 22268.1539995600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

=?utf-8?q?PG_Doc_comments_form?= <noreply(at)postgresql(dot)org> writes:
> The issue is related to the intention of drop the temporary table:
> ;DROP TABLE "myTooImportantTable" -- <--- this drop the
> "myTooImportantTable"
> ;DROP TABLE "myTooImportantTable" -- <--- this drop the
> public."myTooImportantTable"

If you want to be sure you drop a temp table and not a regular one, say

DROP TABLE pg_temp.mytable;

There's no need for new syntax.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Pablo Benito 2018-10-21 00:37:56 Re: The DROP TABLE instruction should have a TEMP option for when a temporary table
Previous Message PG Doc comments form 2018-10-19 23:00:23 The DROP TABLE instruction should have a TEMP option for when a temporary table