X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id 42518CC4AA for ; Wed, 16 Jul 2003 13:42:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 19033-07 for ; Wed, 16 Jul 2003 13:42:26 +0000 (GMT) Received: from irko.smoothcorp.com (unknown [208.49.241.41]) by svr1.postgresql.org (Postfix) with ESMTP id 8B12DCC4A8 for ; Wed, 16 Jul 2003 10:42:03 -0300 (ADT) Received: from jgardner.smoothcorp.com ([10.0.1.63]) by irko.smoothcorp.com with esmtp (Exim 4.12) id 19cmXz-0003nR-00; Wed, 16 Jul 2003 06:42:19 -0700 Received: from jgardner.smoothcorp.com (localhost.localdomain [127.0.0.1]) by jgardner.smoothcorp.com (8.12.8/8.12.8) with ESMTP id h6GDgKXP030503; Wed, 16 Jul 2003 06:42:20 -0700 Received: from localhost (localhost [[UNIX: localhost]]) by jgardner.smoothcorp.com (8.12.8/8.12.8/Submit) id h6GDgJWq030501; Wed, 16 Jul 2003 06:42:19 -0700 From: Jonathan Gardner To: "Vijay Kumar" , Subject: Re: problem with temporary table. Date: Wed, 16 Jul 2003 06:42:13 -0700 User-Agent: KMail/1.5 References: <000c01c346ca$7fc0b660$cf01a8c0@vijay> In-Reply-To: <000c01c346ca$7fc0b660$cf01a8c0@vijay> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200307160642.18964.jgardner@jonathangardner.net> X-SA-Exim-Rcpt-To: vijay@kinera.com, pgsql-sql@postgresql.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/196 X-Sequence-Number: 14310 -----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= =20 cursor or a single row. I am not too sure on how this would work exactly=20 because I have never done it. Someone else may be willing to fill in the=20 details. - --=20 Jonathan Gardner (was jgardn@alumni.washington.edu) Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/FVY4WgwF3QvpWNwRAjIXAJ47L28D29zv91JGXQnA1rQ79wqRlwCeLB56 /+FhmG0tosyNXyH61po2myY=3D =3DUWtn -----END PGP SIGNATURE-----