Re: Wishlist?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Ezequiel Tolnay <mail(at)etolnay(dot)com(dot)ar>, pgsql-general(at)postgresql(dot)org
Subject: Re: Wishlist?
Date: 2005-07-21 16:10:35
Message-ID: 20050721161035.GB25926@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmm, true. So I guess the real solution (once temp tables work nicely)
would be something like CREATE LOCAL TEMP TABLE where the pl/pgsql
parser invents the unusual name for you. Ofcourse, then you run into
the issue where subcalls (like using EXECUTE) won't be able to see that
table either.

What you want is lexical scoping between the pl/pgsql and the backend,
which is not really possible in the current system.

Have a nice day,

On Thu, Jul 21, 2005 at 08:12:11AM -0700, Stephan Szabo wrote:
> On Thu, 21 Jul 2005, Martijn van Oosterhout wrote:
>
> > On Thu, Jul 21, 2005 at 07:10:03PM +1000, Ezequiel Tolnay wrote:
> > > * Create a ROWSET variable type in plpgsql that would function like a
> > > temporary but in-memory table. Support for it would have to be added for
> > > plpgsql's SELECT, UPDATE and DELETE statements.
> >
> > How is this different from a temporary table?
>
> I'd expect they'd scope "correctly" in cases of recursive calls and the
> like. So, if the recursive call wanted its own, it wouldn't have to try to
> find an unused temporary table name. Offhand, I'm not sure if that'd
> really be useful in practice once temporary tables in plpgsql didn't
> require one to jump through hoops, but it has some niceness.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-07-21 16:16:05 Re: Query planner refuses to use index
Previous Message Scott Marlowe 2005-07-21 16:02:26 Re: RAMFS with Postgres