Re: *printf and zero size - Mailing list pgsql-hackers

From Tom Lane
Subject Re: *printf and zero size
Date
Msg-id 2745.1133818857@sss.pgh.pa.us
Whole thread Raw
In response to Re: *printf and zero size  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>     Upon successful completion snprintf() and vsnprintf() return the number
>     of characters that would have been written to a sufficiently sized str,
>     excluding the terminating NUL character.

> but it seems this is some BSD'ism that we don't need to support if the
> standard doesn't say so.

Yeah, that is a BSD-ism.  You have a point though, we ought to document
which return convention the code follows.  I'll add something.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: *printf and zero size
Next
From: Qingqing Zhou
Date:
Subject: About varlena2