From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "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 15:09:39 |
Message-ID: | CAKFQuwaAS15tz7fj4VVTF7VvY_dK=Q71HQXOUko8cLOhNrJtxA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Aug 23, 2017 at 6:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "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".
>
Furthermore, as a matter of good database management ideally the role
creating and dropping temporary tables is different from the role that
retains ownership​ of permanent tables - so that even if the wrong table
was selected object permissions would prevent its being dropped.
I don't think I'd -1 a patch that attempted to provide some incremental
improvement here but I just don't see one being written or getting enough
support to go through. And that doesn't bother me - even if I was in a
position to do so I likely wouldn't write one at this point.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Lazurkin | 2017-08-24 15:11:01 | Change location of function/type installed from C-extension |
Previous Message | Tom Lane | 2017-08-24 14:56:33 | Re: Retrieving query results |