Re: DROP [TEMP] TABLE syntax, as reason why not?

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DROP [TEMP] TABLE syntax, as reason why not?
Date: 2017-08-24 10:53:04
Message-ID: CA+bJJbyjPK_J3-k+NjDmkUgyQ+SqkH_iaa-queoo3HP6ByB56w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 24, 2017 at 11:46 AM, Vincenzo Romano
<vincenzo(dot)romano(at)notorand(dot)it> wrote:
> Once you accept that Postgres is already extending the standard, I
> would focus on syntax consistency and symmetry as a yet-another-extra
> value from Postgres.
>
> Moreover, "DROP TEMP TABLE..." would make it clear and explicit that
> the table is temporary.
> And it would thus "protect the programmer from typos and errors"
> (intentional tongue-in-cheek).

Given drop temp table x is just syntactic sugar to drop table
PG_TEMP.x I think the (slight) increase on the bug-surface is enough
to avoid it, as the pg_temp. makes it equally clear and explicit you
are dropping a temporary table.

And if the programmer forgets the pg_temp. it can equally forget the TEMP.

Francisco Olarte.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2017-08-24 10:58:04 Re: DROP [TEMP] TABLE syntax, as reason why not?
Previous Message Vincenzo Romano 2017-08-24 10:48:16 Re: DROP [TEMP] TABLE syntax, as reason why not?