ECPG's pgtypeslib contains two slightly different prototypes for PGTYPEStimestamp_defmt_scan(), neither of which is in a header file. I propose something like the attached patch, although I'm not sure which header file is the most appropriate one.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных