Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Doh. OK, we gotta fix it then. But what are you going to do when you
>> can't malloc enough memory? You can't ereport in a client environment,
>> and there's no API for printf to report failure.
> Yep, I am digging through snprintf.c now to try find a solution.
Well, there's always the option of going back to plan B, which is not
using printf for strings that might be long. AFAICS it would only be
a convenience for psql, since it's not doing any real conversions,
just inserting the right number of spaces.
regards, tom lane