On 2012-12-11 15:44:39 +0100, Andres Freund wrote:
> On 2012-12-11 15:55:35 +0200, Heikki Linnakangas wrote:
> > * It's pretty ugly that to use the rm_desc functions, you have to provide
> > dummy implementations of a bunch of backend functions, including pfree() and
> > timestamptz_to_str(). Should find a better way to do that.
>
> I think most of the cases requiring those ugly hacks can be fixed to
> just use a caller-provided buffer, there's not that much left.
>
> timestamptz_to_str() is probably the most complex case. I just noticed
> there's already a second implementation in
> ecpg/pgtypeslib/dt_common.c. Yuck. It seems to already have diverged in
> a number of cases :(

The attached (and pushed) patches change relpathbackend to use a static buffer
instead. That gets rid of the pfree() requirement and looks ok otherwise as
well.

Unfortunately that still leaves us with the need to re-implement
relpathbackend() in xlogdump, but that seems somwhat ok to me.

Greetings,

Andres Freund

--
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to