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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
Cc: 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 09:04:22
Message-ID: CAFj8pRBWiO8W=xTqz_Pk3KRvo-W0m9PmjiLGi4usd0ra7jJLeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2017-08-24 9:11 GMT+02:00 Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>:

> 2017-08-24 3:08 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> > "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> >> I'm wondering if there is anything technical preventing someone from
> making:
> >
> >> DROP TEMP TABLE tablename;
> >
> > There is no great need for that because you can get the semantics you're
> > asking for with "DROP TABLE pg_temp.tablename".
> >
> > regards, tom lane
>
> This sounds like another syntax inconsistency/asymmetry.
>
> ALTER TABLE pg_temp.tablename ... is OK.
> ALTER TEMP TABLE tablename ... is NOT OK.
>
> CREATE TEMP TABLE tablename ... is OK.
> CREATE TABLE pg_temp.tablename ... is OK.
>
> DROP TABLE pg_temp.tablename ... is OK.
> DROP TEMP TABLE tablename ... is NOT OK.
>
> Unless the standard explicitly forbids it, why not supporting both
> syntaxes in all commands using the TABLE predicate?
> Those are semantically equivalent. Aren't they?
>

It can be issue when somebody will do port from PostgreSQL to any other
databases. There should be stronger reason for introduction possible NON
ANSI SQL feature than syntactic sugar.

Regards

Pavel

>
> --
> Vincenzo Romano - NotOrAnd.IT
> Information Technologies
> --
> NON QVIETIS MARIBVS NAVTA PERITVS
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2017-08-24 09:46:50 Re: DROP [TEMP] TABLE syntax, as reason why not?
Previous Message Benoit Lobréau 2017-08-24 08:01:02 Explain analyse and toasted data.