Обсуждение: Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)
> 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
Thomas Lockhart <lockhart@alumni.caltech.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
> 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
Thomas Lockhart <lockhart@alumni.caltech.edu> 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