pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan Gardner <jgardner@jonathangardner.net>
To: Vijay Kumar <vijay@kinera.com>
To: pgsql-sql@postgresql.org
Subject: Re: problem with temporary table.
Date: Wed, 16 Jul 2003 06:42:13 -0700
Message-ID: <200307160642.18964.jgardner@jonathangardner.net> (raw)
In-Reply-To: <000c01c346ca$7fc0b660$cf01a8c0@vijay>
References: <000c01c346ca$7fc0b660$cf01a8c0@vijay>

-----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@jonathangardner.net>
(was jgardn@alumni.washington.edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

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



view thread (2+ messages)

Message-ID: <200307160642.18964.jgardner@jonathangardner.net>
Permalink:  ../200307160642.18964.jgardner@jonathangardner.net/
Also on:    postgresql.org/message-id/200307160642.18964.jgardner@jonathangardner.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jgardner@jonathangardner.net, vijay@kinera.com
  Subject: Re: problem with temporary table.
  In-Reply-To: <200307160642.18964.jgardner@jonathangardner.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox