You need to install the package pgdg-srpm-macros from the PGDG repository to provide their custom RPM macros.
pgdg-srpm-macros