Re: [pgsql-hackers-win32] snprintf causes regression tests to fail - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [pgsql-hackers-win32] snprintf causes regression tests to fail
Date
Msg-id 12196.1109787707@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-hackers-win32] snprintf causes regression tests  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [pgsql-hackers-win32] snprintf causes regression  (pgsql@mohawksoft.com)
Re: [pgsql-hackers-win32] snprintf causes regression tests  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> First line of thought: we surely must not insert a snprintf into
>> libpq.so unless it is 100% up to spec *and* has no performance issues
>> ... neither of which can be claimed of the CVS-tip version.

> Agreed, and we have to support all the 64-bit specifications a port
> might support like %qd and %I64d as well as %lld.  I have added that to
> our current CVS version.

I really dislike that idea and request that you revert it.

> Is there any way we can have just gettext() call our snprintf under a
> special name?

The issue only comes up in libpq --- in the backend there is no reason
that snprintf can't be our snprintf, and likewise in self-contained
programs like psql.  It might be worth the pain-in-the-neck quality to
have libpq refer to the functions as pq_snprintf etc.  Perhaps we could
do this via macros

#define snprintf    pq_snprintf

and not have to uglify the source code.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: logging as inserts
Next
From: Michael Adler
Date:
Subject: Re: 8.0.X and the ARC patent