gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

Do we really need PG_VERSION conditonal compilation to adapt old versions in extensions?

Open wfnuser opened this issue 2 years ago • 1 comments

Enhancement

Hi there, I found it to be universal that we're using some macros like PG_VERSION_NUM as the compile condition to adapt with older version GP (I guess) in extensions. Here is an example in pxf_fdw.c: image

This is strange to me because I think the extension should always upgrade and build with GP major version. I'm wondering if there is a user case that the user want to build the extension seperately and work with an older major version GP? Otherwise, I'm considering remove the redundant macro conditional compilation.

Just some confusion. I'm really new at database and greenplum. Thank you for reading.

wfnuser avatar Jul 29 '22 02:07 wfnuser

single extension can work for different GP/PG major versions with the same code base so this is why it check version by micro. cleaning up such part would make code different on different major branch which introduce more maintenance effort. Defer to PXF team to consider whether it is necessary to clean old macro or not. @denalex FYI

lij55 avatar Aug 01 '22 23:08 lij55