Skip site navigation (1) Skip section navigation (2)

Re: Found small issue with OUT params

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org,Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mike Rylander <mrylander(at)gmail(dot)com>
Subject: Re: Found small issue with OUT params
Date: 2005-09-30 18:26:02
Message-ID: 200509301426.03557.xzilla@users.sourceforge.net (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-hackers by date

Next:From: Ron PeacetreeDate: 2005-09-30 20:20:50
Subject: Re: [PERFORM] A Better External Sort?
Previous:From: Joshua D. DrakeDate: 2005-09-30 17:53:22
Subject: Re: Found small issue with OUT params

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group