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
On Fri, 20 Apr 2012 17:36:59 +0200
Vincenzo Romano vincenzo.rom...@notorand.it 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
On Fri, Apr 20, 2012 at 10:36 AM, Vincenzo Romano
vincenzo.rom...@notorand.it 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
2012/4/20 Merlin Moncure mmonc...@gmail.com:
On Fri, Apr 20, 2012 at 10:36 AM, Vincenzo Romano
vincenzo.rom...@notorand.it 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
On Fri, Apr 20, 2012 at 10:51 AM, Vincenzo Romano
vincenzo.rom...@notorand.it wrote:
2012/4/20 Merlin Moncure mmonc...@gmail.com:
On Fri, Apr 20, 2012 at 10:36 AM, Vincenzo Romano
vincenzo.rom...@notorand.it wrote:
Hi all.
I'd like use a temporary view to hide a non-temp one for some
Merlin Moncure mmonc...@gmail.com writes:
On Fri, Apr 20, 2012 at 10:51 AM, Vincenzo Romano
vincenzo.rom...@notorand.it wrote:
Ok. That works. How can I know if there's a temporary view with the
same name in my session?
well, arguably you should already know somehow. but if you don't,
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Merlin Moncure mmonc...@gmail.com writes:
On Fri, Apr 20, 2012 at 10:51 AM, Vincenzo Romano
vincenzo.rom...@notorand.it wrote:
Ok. That works. How can I know if there's a temporary view with the
same name in my session?
well, arguably you should
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Merlin Moncure mmonc...@gmail.com writes:
On Fri, Apr 20, 2012 at 10:51 AM, Vincenzo Romano
vincenzo.rom...@notorand.it wrote:
Ok. That works. How can I know if there's a temporary view with the
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
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
On Fri, Apr 20, 2012 at 11:07 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Merlin Moncure mmonc...@gmail.com writes:
well, arguably you should already know somehow. but if you don't,
query information_schema.views for a table_name with a table_schema
LIKE 'pg_temp%'.
Not sure that is safe ---
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
You might be able to use DROP VIEW pg_temp.foo, which will either
drop a temp view of your own session or
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
You might be able to use DROP VIEW pg_temp.foo, which
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2012/4/20 Vincenzo Romano vincenzo.rom...@notorand.it:
2012/4/20 Tom Lane
Vincenzo Romano vincenzo.rom...@notorand.it writes:
As you can see, the third time I get a NOTICE message I don't get the
first two times.
Everything works fine but this strange thing...
There's a typo (extra create temporary view), Sorry,
Hm, yeah, the first time would throw an error
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
As you can see, the third time I get a NOTICE message I don't get the
first two times.
Everything works fine but this strange thing...
There's a typo (extra create temporary view), Sorry,
Hm, yeah,
Vincenzo Romano vincenzo.rom...@notorand.it writes:
The weirdness is that it doesn't produce any notice the first two times.
At the third invocation I see the notice coming out.
I'd suggest tweaking the exception handler to print the error it caught;
that would probably clarify what is
2012/4/20 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
The weirdness is that it doesn't produce any notice the first two times.
At the third invocation I see the notice coming out.
I'd suggest tweaking the exception handler to print the error it caught;
Vincenzo Romano vincenzo.rom...@notorand.it writes:
Why not using the implicit pg_temp_nnn as seen in views and tables?
That's intentional, it was considered too much of a security risk to
let temporary functions mask normal ones.
regards, tom lane
--
Sent via
18 matches
Mail list logo