Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)
Date: 1999-09-09 13:44:35
Message-ID: 6992.936884675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> Cope with versions of vsnprintf() written by people who
>> don't read man pages...

> RETURN VALUE
> If the output was truncated, the return value is -1,
> otherwise it is the number of characters stored, not
> including the terminating null.

> Is this consistant with the behavior you see on Linux? It's a GNU
> library thing...

That is the behavior I saw on my Linux box, but the manpage installed
on the same box sez that the return value is equal to the passed buffer
size if there's an overrun. Maybe the manpage is out of date.

Anyway, the fixed code copes with both conventions.

You'll need to re-initdb to get rid of the broken rules in your
database, but then things should be OK...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-09-09 14:44:25 Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)
Previous Message Thomas Lockhart 1999-09-09 12:33:14 Re: [HACKERS] Re: Problem enabling pltcl