Re: Convert *GetDatum() and DatumGet*() macros to inline functions - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Convert *GetDatum() and DatumGet*() macros to inline functions
Date
Msg-id CAJ7c6TPGFrzcV4Q-LBWPrpbYLo0ocj9i_O=EJHAP9U5BCwPu6w@mail.gmail.com
Whole thread Raw
In response to Convert *GetDatum() and DatumGet*() macros to inline functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: Convert *GetDatum() and DatumGet*() macros to inline functions
List pgsql-hackers
Hi Peter,

> To address this, I converted these macros to inline functions

This is a great change!

I encountered passing the wrong arguments to these macros many times,
and this is indeed pretty annoying. I wish we could forbid doing other
stupid things as well, e.g. comparing two Datum's directly, which for
Timestamps works just fine but only on 64-bit platforms. Although this
is certainly out of scope of this thread.

The patch looks good to me, I merely added a link to the discussion. I
added it to the CF application. Cfbot is making its mind at the moment
of writing.

Do you think this should be backported?

-- 
Best regards,
Aleksander Alekseev

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Strip -mmacosx-version-min options from plperl build
Next
From: Tom Lane
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types