Re: problem with temporary table.

From: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
To: "Vijay Kumar" <vijay(at)kinera(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: problem with temporary table.
Date: 2003-07-16 13:42:13
Message-ID: 200307160642.18964.jgardner@jonathangardner.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 10 July 2003 03:03, Vijay Kumar wrote:
> Hi,
> We are using postgresql7.3.3, we are encountering some problems by
> using temporary tables.
>
> Actually our requirement was,
> 1. create temporary table.
> 2. insert some values on that table by using some quries.
> 3. select the inserted values from the temporary table.
>
< snip>
>
> The above function is working fine for the first call, from next
> call onwards it is throwing the below error. Error: relation 'temp_table'
> already exists.
>

So drop the table when you are done with it.

You may also want to investigate returning a table of data, rather than a
cursor or a single row. I am not too sure on how this would work exactly
because I have never done it. Someone else may be willing to fill in the
details.

- --
Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
(was jgardn(at)alumni(dot)washington(dot)edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/FVY4WgwF3QvpWNwRAjIXAJ47L28D29zv91JGXQnA1rQ79wqRlwCeLB56
/+FhmG0tosyNXyH61po2myY=
=UWtn
-----END PGP SIGNATURE-----

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-16 14:27:24 Re: numerical sort on mixed alpha/numeric data
Previous Message Viorel Dragomir 2003-07-16 13:41:31 pg_dump "feature"