Search Postgresql Archives

Re: How to drop a temporary view?

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

 



On Fri, Apr 20, 2012 at 10:36 AM, Vincenzo Romano
<vincenzo.romano@xxxxxxxxxxx> wrote:
> Hi all.
> I'd like use a temporary view "to hide" a non-temp one  for some queries.
> Later I'd need to drop that view in order to "revert to normal operations".
> As there is no "DROP TEMPORARY VIEW ..." I'd be forced to "CREATE OR
> REPLACE TEMPORARY VIEW ..." in order to "overwrite" the temporary one
> with the same code as the non-temporary.
> All this sounds quite complex to me. Is there a way to drop temporary
> stuff before closing the session?
> TIA.

you can do it with vanilla DROP VIEW:

postgres=# create temp view t as select 1;
CREATE VIEW
postgres=# drop view t;
DROP VIEW

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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