Re: Temporary views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Temporary views
Date: 2004-02-11 05:10:29
Message-ID: 15211.1076476229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Currently you can create temporary tables that are deleted at the end of the
> session. But how about temporary views? It's just a table with a rule so I
> don't imagine it would be terribly difficult. Are there any issues I havn't
> thought of?

> While we're at it, what about temporary functions?

AFAICS, anything created in the temp schema will get zapped at backend
shutdown. (It would be a good idea to rename RemoveTempRelations and
related functions in namespace.c if they are going to be used to zap
other sorts of objects, but they will work as-is.)

So this is doable with just a Small Matter of Programming to pass the
is-temp flag through from the grammar to wherever the object gets
created.

Whether it's worth the trouble is another question. What's the
use-case?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-02-11 05:26:06 Re: DB cache size strategies
Previous Message Tom Lane 2004-02-11 04:31:54 Re: Join query on 1M row table slow