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

Re: float4/float8/int64 passed by value with tsearchfixup

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zoltan Boszormenyi <zb(at)cybertec(dot)at>, 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: float4/float8/int64 passed by value with tsearchfixup
Date: 2008-04-18 19:23:04
Message-ID: 20080418192304.GF572@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > I assume this is just some dumb portability mistake on my part ... or
> > perhaps the fact that the functions are still using v0 fmgr convention?
> 
> Since they're v0, they'd have to explicitly know about the pass-by-ref
> status of float4.

Well, the previous code was doing some pallocs, and the new code is not:
http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/seg/seg.c.diff?r1=1.20;r2=1.21


> Did this patch include a compile-time choice of whether things could
> remain pass-by-ref?  I rather imagine that some people out there will
> prefer to stay that way instead of fix their old v0 code.

Hmm, nope.  Do we really need that?

I understand the backwards-compatibility argument, yet I wonder if it's
worth the extra effort and code complexity.

> In the meantime, converting contrib/seg to v1 might be the best
> solution.

Will do.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2008-04-18 19:41:28
Subject: Re: float4/float8/int64 passed by value with tsearch fixup
Previous:From: Tom LaneDate: 2008-04-18 19:14:48
Subject: Re: float4/float8/int64 passed by value with tsearch fixup

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