gpdb
gpdb copied to clipboard
Do we really need PG_VERSION conditonal compilation to adapt old versions in extensions?
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:
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.
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