Re: Found small issue with OUT params - Mailing list pgsql-hackers

From Robert Treat
Subject Re: Found small issue with OUT params
Date
Msg-id 200509301426.03557.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: Found small issue with OUT params  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Friday 30 September 2005 11:49, Martijn van Oosterhout wrote:
> On Fri, Sep 30, 2005 at 10:20:34AM -0500, Tony Caduto wrote:
> > Tom,
> > I hardly think the overhead would be significant on modern processors, I
> > don't think the majority of users are running on Pentium 90s.( I am
> > assuming you mean a performance overhead)
>
> Um, please read the documention. Returning a tuple is *significantly*
> more expensive than returning a single value. You have to get the tuple
> descriptor, allocate memory for the tuple, fill in all the fields with
> your data... For a single value you just return it.
>

ISTM it is better for us to be consistent with the visible behavior than to 
have two different behaviors for out param functions just so one can be 
faster.  That way if people are concerned about the speed difference, they 
can rewrite the function without an out param...  afaict, as it stands now 
you've given them no choice and are forcing them to handle two different 
scenarios. 
-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Found small issue with OUT params
Next
From: Josh Berkus
Date:
Subject: Re: [PERFORM] A Better External Sort?