Re: [PATCHES] Simplify formatting.c

2008-06-21 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> I'd say not. Can't we do some more refactoring and avoid so many > >> useless conversions? Seems like str_initcap is the wrong primitive API > >> --- the work ought to be done by a function that takes a char poin

Re: [PATCHES] Simplify formatting.c

2008-06-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I'd say not. Can't we do some more refactoring and avoid so many >> useless conversions? Seems like str_initcap is the wrong primitive API >> --- the work ought to be done by a function that takes a char pointer >> and a length. That

Re: [PATCHES] Simplify formatting.c

2008-06-21 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > The third step is for oracle_compat.c::initcap() to use > > formatting.c::str_initcap(). You can see the result; patch attached > > (not applied). > > > This greatly reduces the size of initcap(), with the downside that we > > are m

Re: [PATCHES] Simplify formatting.c

2008-06-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > The third step is for oracle_compat.c::initcap() to use > formatting.c::str_initcap(). You can see the result; patch attached > (not applied). > This greatly reduces the size of initcap(), with the downside that we > are making two extra copies of the

Re: [PATCHES] Simplify formatting.c

2008-06-21 Thread Bruce Momjian
Bruce Momjian wrote: > Bruce Momjian wrote: > > Alvaro Herrera wrote: > > > Bruce Momjian wrote: > > > > > > > I moved str_initcap() over into oracle_compat.c and then had initcap() > > > > convert to/from TEXT to call it. The code is a little weird because > > > > str_initcap() needs to convert