Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c' - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'
Date
Msg-id m0zcvUb-0000eRC@druid.net
Whole thread Raw
In response to Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
Thus spake Tom Lane
> Actually, what would be *really* whizzy is some way of sprintf'ing
> into a StringInfo, with the ability to auto-expand the StringInfo as
> needed.  But that requires hooking into the low-level guts of printf,
> and AFAIK there's no portable way to do it short of providing your
> own complete printf implementation.  Not worth it.

Yah, C really missed the boat there.  I remember the Aztec C compiler
for CP/M had this neato function called format() which was used to
implement all the printf functions.  You could write your own printf
type function by calling format with the function that handled the
output characters.  I was real dissapointed to find out that it wasn't
a standard function.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Goran Thyni
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'
Next
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'