X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 405C1D9B9C for ; Thu, 29 Sep 2005 03:32:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95559-03 for ; Thu, 29 Sep 2005 06:32:02 +0000 (GMT) Received: from ls405.htnet.hr (ls405.htnet.hr [195.29.150.97]) by svr1.postgresql.org (Postfix) with ESMTP id ACC3CD9B7F for ; Thu, 29 Sep 2005 03:32:01 -0300 (ADT) Received: from ls401.t-com.hr (ls401.t-com.hr [195.29.150.236]) by ls405.htnet.hr (0.0.0/8.12.10) with ESMTP id j8T6W0Wl008021 for ; Thu, 29 Sep 2005 08:32:01 +0200 Received: from ls401.t-com.hr (localhost.localdomain [127.0.0.1]) by ls401.t-com.hr (Qmlai) with ESMTP id 4F6E270003 for ; Thu, 29 Sep 2005 08:32:01 +0200 (CEST) X-Envelope-Sender: mario.splivalo@mobart.hr Received: from 83-131-20-105.adsl.net.t-com.hr (83-131-20-105.adsl.net.t-com.hr [83.131.20.105]) by ls401.t-com.hr (Qmlai) with ESMTP id D70C5A8003 for ; Thu, 29 Sep 2005 08:32:00 +0200 (CEST) Subject: Re: Sending function parametars within EXECUTE ''SELECT... From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: pgsql-sql@postgresql.org In-Reply-To: References: <1127926269.16100.3.camel@localhost.localdomain> Content-Type: text/plain Organization: Mob-Art Date: Thu, 29 Sep 2005 08:30:31 +0200 Message-Id: <1127975432.8131.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/290 X-Sequence-Number: 22837 On Wed, 2005-09-28 at 10:01 -0700, codeWarrior wrote: > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: don't forget to increase your free space map settings > > > > FOR rec IN EXECUTE ''SELECT COUNT(col1) AS num FROM tmpTbl WHERE col2 = " || > aBid || '' LOOP > Huh! :) Seems so obvious now :) Is there a way to assing variable a value returned from query that accesses the temporary table in a way you explained above? For instance, I can do: myValue := col2 FROM tmpTbl WHERE someValue = somethingElse... But then I encounter the problem with temp tables. Can I do EXECUTE'd SELECT like you explained above? Or I need to do 'widdleing' with FOR like explained above? Mario