Alvaro Herrera <> writes:
> Tom Lane wrote:
>> ... BTW, another reason to choose identical APIs for frontend and backend
>> versions of these functions is that it greatly eases use of them in shared
>> frontend/backend code.  As I notice somebody has *already done* in
>> common/relpath.c.   I'm not exactly sure how those psprintf calls are
>> working at all in frontend builds.

> There's psprintf in src/common/fe_memutils.c, too, using the backend's
> API, which is why this works.

Ah --- that's why it links, anyway.  As for "works", I suspect that the
answer is that anole has a vsnprintf that returns -1 on buffer overrun.
vasprintf and then psprintf will interpret that as "out of memory",
resulting in the observed behavior.  It'd be interesting to see the stack
trace from that error, though, just to confirm this theory.

                        regards, tom lane

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to