*printf and zero size

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: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: *printf and zero size
Date: 2005-12-05 20:44:51
Message-ID: 200512052044.jB5Kip216855@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom, did you implement this functionality in *printf?

The size may be given as zero to find out how many characters are
needed; in this case, the str argument is ignored. Sprintf() and
vsprintf() effectively assume an infinite size.

Looking at the code it doesn't seem supported. Should it be added to
the limitations comment section?

--
Bruce Momjian | http://candle.pha.pa.us
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-05 21:05:58 Re: *printf and zero size
Previous Message Tom Lane 2005-12-05 20:37:19 Re: [PATCHES] snprintf() argument reordering not working