Re: Moving core timestamp typedefs/macros somewhere else
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Meskes <meskes@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Date: 2011-09-09T17:30:57Z
Lists: pgsql-hackers
Attachments
- ecpg-use-datatype-timestamp-h.patch (text/x-patch)
I wrote: > I propose moving the Timestamp/Interval typedefs, as well as some basic > associated macros such as the ones mentioned above (basically, lines > 25-100 of utils/timestamp.h, plus the DT_NOBEGIN/DT_NOEND stuff, plus > the Julian-date macros in datetime.h), into a separate header file that > contains no backend-only declarations (eg, not fmgr.h stuff; right > offhand I don't think it would depend on anything except c.h). I've committed this patch, but there was one aspect that remains unfinished. I had hoped to remove the duplicative parts of ecpg's dt.h header in favor of including datatype/timestamp.h, along the lines of the attached patch. However, while ecpg itself compiles with that change, its test programs do not; apparently they include pgtypes_timestamp.h without previously including anything that defines typedef int32. I'm unsure if there's a reasonable way to work around that --- any thoughts? regards, tom lane