Skip site navigation (1) Skip section navigation (2)

Re: [pgsql-hackers-win32] snprintf causes regression tests

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nicolai Tufar <ntufar(at)gmail(dot)com>,Magnus Hagander <mha(at)sollentuna(dot)net>,PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests
Date: 2005-03-02 15:41:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Have we considered what is going to happen to applications when they use
> > our snprintf instead of the one from the operating system?
> Hmm ...
> First line of thought: we surely must not insert a snprintf into
> 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.

> Second line of thought: libpq already feels free to insert allegedly
> up-to-spec versions of a number of things, and no one has complained.
> Maybe the linker prevents problems by not linking these versions to
> any calls from outside libpq?

I just tested on BSD/OS and a program with a single printf() call does
call our printf if libpq is used on the link line.  The program makes no
libpq calls at all.

> Third thought: Windows' linker seems to be broken enough that it may
> create problems of this ilk that exist on no other platform.

Yes, strangly the Window's linker is fine because libpqdll.def defines
what symbols are exported.  I don't think Unix has that capability.

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

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to


pgsql-hackers by date

Next:From: Dave CramerDate: 2005-03-02 15:41:57
Subject: Re: 8.0.X and the ARC patent
Previous:From: Mark WongDate: 2005-03-02 15:21:41
Subject: Re: 8.0.X and the ARC patent

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-03-02 15:43:01
Subject: Re: snprintf improvements
Previous:From: Peter EisentrautDate: 2005-03-02 15:07:43
Subject: Re: snprintf improvements

pgsql-hackers-win32 by date

Next:From: pgsqlDate: 2005-03-02 16:00:53
Subject: Re: [pgsql-hackers-win32] snprintf causes regression
Previous:From: pgsqlDate: 2005-03-02 12:09:37
Subject: Re: snprintf causes regression tests to fail

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group