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

Re: Re: int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1

From: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-patches(at)postgresql(dot)org, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Re: int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1
Date: 2008-03-25 15:13:10
Message-ID: 47E91686.6040800@cybertec.at (view raw or flat)
Thread:
Lists: pgsql-patches
Alvaro Herrera írta:
> I don't think
> 	my $int64passbyval = "(?($real64 = 1)t|f)";
>
> works.  Perhaps
>
> 	my $int64passbyval = $real64 ? 't' : 'f';
>   

Thanks. Modified patch attached.

Stupid question follows. Now that float4 is passed by value
unconditionally, is it worth modifying the *penalty() functions
in GIST/TSearch to just use PG_RETURN_FLOAT4()?
Or the implicit "modify the float4 value at the caller site and
return the same pointer I got as 3rd parameter" is an internal API
set in stone? Modifying them to have only 2 parameters
(the 3rd one was an implicit OUT parameter anyway) and
omitting the pointer dereference might give a small speedup.

-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/


Attachment: pg84-passedbyval-v5.patch.gz
Description: application/x-tar (6.1 KB)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2008-03-25 15:48:48
Subject: Re: TRUNCATE TABLE with IDENTITY
Previous:From: Alvaro HerreraDate: 2008-03-25 14:47:24
Subject: Re: postgresql in FreeBSD jails: proposal

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