Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2017 at 6:08 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"David G. Johnston" <david.g.johnston@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux