Re: Question about functions

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mike Plemmons <mikeplemmons(at)gmail(dot)com>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Question about functions
Date: 2005-10-17 11:17:23
Message-ID: 43538843.5000308@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David Pradier 2005-10-17 13:56:05 Re: Design problem : using the same primary keys for inherited objects.
Previous Message Richard Huxton 2005-10-17 08:22:16 Re: Question about functions