Use __mad_version class to make the code be compatible with older
versions of GPDB and PG