On 2013-01-08 23:02:15 +0200, Heikki Linnakangas wrote:
> On 08.01.2013 23:00, Andres Freund wrote:
> >>Note that the xlogreader facility doesn't need any more emulation. I'm quite
> >>satisfied with that part of the patch now. However, the rmgr desc routines
> >>do, and I'm not very happy with those. Not sure what to do about it. As you
> >>said, we could add enough infrastructure to make them compile in frontend
> >>context, or we could try to make them rely less on backend functions.
> >
> >Which emulation needs are you missing in the desc routines besides
> >relpathbackend() and timestamptz_to_str()? pfree() is "just" needed
> >because its used to free the result of relpathbackend(). No own pallocs,
> >no ereport ...
>
> Nothing besides those, those are the stuff I was referring to.
Yea :(. As I said, I think its reasonable to emulate the former but
timestamptz_to_str() seems too be too complex for that.
Extracting the whole datetime/timestamp handling into a backend
independent "module" seems like complex overkill to me although it might
be useful to reduce the duplication of all that code in ecpg. (which
deviated quite a bit by now). No idea how to solve that other than
returning placeholder data atm.
Greetings,
Andres Freund
--Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services