Search Postgresql Archives

Re: How to drop a temporary view?

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

 



2012/4/20 Tom Lane <tgl@xxxxxxxxxxxxx>:
> Vincenzo Romano <vincenzo.romano@xxxxxxxxxxx> writes:
>> 2012/4/20 Vincenzo Romano <vincenzo.romano@xxxxxxxxxxx>:
>>> 2012/4/20 Tom Lane <tgl@xxxxxxxxxxxxx>:
>>>> You might be able to use "DROP VIEW pg_temp.foo", which will either
>>>> drop a temp view of your own session or throw an error if there is none.
>
>> It works only if you have created at least one temporary object.
>> Until that the pg_temp "meta schema" doesn't resolve to a real schema
>> and the exception is thrown!
>
> I didn't say *which* error would get thrown ;-).  If you are checking
> that you'd need to be prepared for both cases.
>
>                        regards, tom lane

... WHEN OTHERS THEN NULL

should be pretty safe to DROP a VIEW!

-- 
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