Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-17 Thread Alvaro Herrera
Gavin Sherry wrote: > Hi all, > > Attached are more fixes. Applied, thanks. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-13 Thread Gavin Sherry
Hi all, Attached are more fixes. Thanks, Gavin, with Feng Tian Index: src/backend/access/common/heaptuple.c === RCS file: /Users/swm/pgsql-cvs/pgsql/src/backend/access/common/heaptuple.c,v retrieving revision 1.120 diff -c -p -r1.12

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gavin Sherry
On Sun, Apr 13, 2008 at 01:42:02AM +0100, Gregory Stark wrote: > "Gavin Sherry" <[EMAIL PROTECTED]> writes: > > > On Sat, Apr 12, 2008 at 07:07:48PM -0400, Tom Lane wrote: > >> Gavin Sherry <[EMAIL PROTECTED]> writes: > >> > I wish. It was actually thrown up when we (Greenplum) changed the macros

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gregory Stark
"Gavin Sherry" <[EMAIL PROTECTED]> writes: > On Sat, Apr 12, 2008 at 07:07:48PM -0400, Tom Lane wrote: >> Gavin Sherry <[EMAIL PROTECTED]> writes: >> > I wish. It was actually thrown up when we (Greenplum) changed the macros >> > to be inline functions as part of changing Datum to be 8 bytes. >>

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: >> might as well just use PG_RETURN_DATUM instead of casting twice. > Oh of course. Updated patch attached. Applied, thanks. regards, tom lane -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gavin Sherry
On Sat, Apr 12, 2008 at 07:07:48PM -0400, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > I wish. It was actually thrown up when we (Greenplum) changed the macros > > to be inline functions as part of changing Datum to be 8 bytes. > > Hmmm ... Datum has been 8 bytes for many years,

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > I wish. It was actually thrown up when we (Greenplum) changed the macros > to be inline functions as part of changing Datum to be 8 bytes. Hmmm ... Datum has been 8 bytes for many years, on 64-bit machines. What is it you're trying to accomplish by making

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gavin Sherry
On Sat, Apr 12, 2008 at 06:02:39PM -0400, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > This may seem a little pedantic but I noticed a few places where we pass > > a datum to a macro which treats the datum as a pointer. This works now > > but might not in the future (if, say, Datu

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > This may seem a little pedantic but I noticed a few places where we pass > a datum to a macro which treats the datum as a pointer. This works now > but might not in the future (if, say, Datum were to be 8 bytes). Yeah, definitely something to fix. I thin

[PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gavin Sherry
This may seem a little pedantic but I noticed a few places where we pass a datum to a macro which treats the datum as a pointer. This works now but might not in the future (if, say, Datum were to be 8 bytes). Thanks, Gavin Index: src/backend/utils/adt/varlena.c ===