Re: BUG #1741: %i missing in snprintf implementation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tim Mauch" <tgmauch(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1741: %i missing in snprintf implementation
Date: 2005-06-30 21:35:16
Message-ID: 21934.1120167316@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Tim Mauch" <tgmauch(at)yahoo(dot)com> writes:
> The implementation of snprintf/vsnprintf in src/port/snprintf.c does not
> allow the use of %i ( %d equivalent ). This likely isn't a problem for
> postgres itself, but when a program compiles with -lpq and the standard c
> libraries are not previously included the use of %i in the format string of
> snprintf causes segmentation faults.
> This is easily fixed by adding "case 'i':" to the same block of code handled
> by "case 'd':" and case 'D':" in the implementation.

We are certainly not going to buy into the assumption that our snprintf
has to support every odd feature that anyone anywhere thinks snprintf
should have :-(. The correct response to this is to figure out how your
program's calls got linked to our snprintf, and stop that from
happening.

AFAICS, our library should be defining the global symbol pg_snprintf not
snprintf. Can you look into why that's not happening for you?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message easyjava 2005-07-01 06:55:15 server restart when connections thread over 155 in PostgreSQL 8.03
Previous Message Stephan Szabo 2005-06-30 17:24:03 Re: BUG #1740: Deferred foreign key constraint isn't deferred