table variables

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: table variables
Date: 2006-05-18 11:16:02
Message-ID: e4hhl4$2uv5$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Are there table variables in postgresql that you can include in a join?
If there are other suggestions as to how I can get done what I need
done, I would appreciate those as well.

What I am trying to do is write a multi step query, where it would be
much much much more efficient to create a temp table, so a single insert
and then populate it with update statements.
The problem is that you can't use a temp table in functions without
dynamic execute statements, and those don't work for other parts of the
code (besides the fact that they're confusing).

I was thinking a table variable, such as exists in msssql, would be the
perfect answer.

What I'll probably end up doing is having a permanent table and
including the ip address of the client machine, so that each time it is
used the data can be easily deleted.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nik 2006-05-18 13:58:14 Insert into partition table hangs
Previous Message Martijn van Oosterhout 2006-05-18 11:13:13 Re: table variables