From: Richard Huxton <dev@archonet.com>
To: Mike Plemmons <mikeplemmons@gmail.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Question about functions
Date: Mon, 17 Oct 2005 12:17:23 +0100
Message-ID: <43538843.5000308@archonet.com> (raw)
In-Reply-To: <2f8663320510170406g55362fe6if76dc339d91b29be@mail.gmail.com>
References: <2f8663320510162024j17b4fdb0n4d2b5df1e32d1863@mail.gmail.com>
<43535F38.8090202@archonet.com>
<2f8663320510170406g55362fe6if76dc339d91b29be@mail.gmail.com>
Mike Plemmons wrote:
>>
>>These are great tips! I will be more specific the next time I post.
>>Regarding the ineffiencient query. What do you suggest as a better way? I
>>would rather learn proper methods than continue to use improper ones.
Just send the query directly from the application - the way you're doing
it, the function will have to assemble the query, execute it, fetch all
the results and then return them to your application. Of course, if your
query altered each row as it fetched them (e.g. to calculate a running
total) then this would be a sensible approach.
PS - don't forget to CC: the list when replying - that's the convention
around here.
--
Richard Huxton
Archonet Ltd
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: dev@archonet.com, mikeplemmons@gmail.com
Subject: Re: Question about functions
In-Reply-To: <43538843.5000308@archonet.com>
* 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