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 CAJ7c6TNaygq+0mLxUK5j1HWU9LCHKFbZPVa-+xY=P0JiOx=x7w@mail.gmail.com
Whole thread Raw
In response to Re: Convert *GetDatum() and DatumGet*() macros to inline functions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Convert *GetDatum() and DatumGet*() macros to inline functions
Re: Convert *GetDatum() and DatumGet*() macros to inline functions
List pgsql-hackers
Tom, Robert,

> Yeah, I don't see a reason to back-patch a change like this

Maybe we should consider backporting at least 0001 patch, partially
perhaps? I believe if fixes pretty cursed pieces of code, e.g:

```
             pg_cryptohash_ctx *context =
-            (pg_cryptohash_ctx *) PointerGetDatum(foundres);
+            (pg_cryptohash_ctx *) DatumGetPointer(foundres);
```

This being said, personally I don't have a strong opinion here. After
all, the code works and passes the tests. Maybe I'm just being a
perfectionist here.

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types
Next
From: Robert Haas
Date:
Subject: Re: Convert *GetDatum() and DatumGet*() macros to inline functions