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...

- Thomas

--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California

Search Discussions

  • Tom Lane at Sep 9, 1999 at 1:45 pm

    Thomas Lockhart 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
  • Thomas Lockhart at Sep 10, 1999 at 4:38 am

    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...
    Things look great. Thanks!

    btw, any problem with trimming the numeric test back to taking a few
    seconds, perhaps up to 30 seconds? It takes *way* too long at the
    moment...

    - Thomas

    --
    Thomas Lockhart lockhart@alumni.caltech.edu
    South Pasadena, California
  • Tom Lane at Sep 10, 1999 at 2:22 pm

    Thomas Lockhart writes:
    btw, any problem with trimming the numeric test back to taking a few
    seconds, perhaps up to 30 seconds? It takes *way* too long at the
    moment...
    I've been griping about the slowness of the numeric test since it was
    put in. Even a 2x reduction in the time taken would be really helpful.
    Jan?

    regards, tom lane

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedSep 9, '99 at 12:22p
activeSep 10, '99 at 2:22p
posts4
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Thomas Lockhart: 2 posts Tom Lane: 2 posts

People

Translate

site design / logo © 2021 Grokbase