pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Splivalo <mario.splivalo@mobart.hr>
To: pgsql-sql@postgresql.org
Subject: Re: Sending function parametars within EXECUTE ''SELECT...
Date: Thu, 29 Sep 2005 08:30:31 +0200
Message-ID: <1127975432.8131.0.camel@localhost.localdomain> (raw)
In-Reply-To: <dhei5n$1fee$1@news.hub.org>
References: <1127926269.16100.3.camel@localhost.localdomain>
	<dhei5n$1fee$1@news.hub.org>

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




view thread (5+ messages)  latest in thread

Message-ID: <1127975432.8131.0.camel@localhost.localdomain>
Permalink:  ../1127975432.8131.0.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1127975432.8131.0.camel@localhost.localdomain

 · 

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: mario.splivalo@mobart.hr
  Subject: Re: Sending function parametars within EXECUTE ''SELECT...
  In-Reply-To: <1127975432.8131.0.camel@localhost.localdomain>

* 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