Euler Taveira de Oliveira wrote:
> Tom Lane wrote:
>
> > Also, it seems a bit inconsistent to be relying on
> > oracle_compat.c for upper/lower but not initcap.
> >
> I saw this inconsistence while I'm doing the patch. What about moving
> that upper/lower/initcap and wcs* code to another file. p
Bruce Momjian wrote:
> > I am starting to think that the simplest case is to keep the single-copy
> > version in there for single-byte encodings and not worry about the
> > overhead of the multi-byte case.
>
> My new idea is if we pass the length to str_initcap, we can eliminate
> the string copy
Bruce Momjian wrote:
> > Actually it seems like the hard part is not so much the input
> > representation as the output representation --- what should the
> > base-level initcap routine return, to be reasonably efficient for
> > both cases?
>
> I hadn't gotten to trying it out yet, but I can see t
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
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
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
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
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
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 to text to use texttowcs(), so in
>
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 to text to use texttowcs(), so in
> > multibyte encodings initcap co
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 to text to use texttowcs(), so in
> multibyte encodings initcap converts the string to text, then to
Tom Lane wrote:
> Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes:
> > Tom Lane wrote:
> >> Also, it seems a bit inconsistent to be relying on
> >> oracle_compat.c for upper/lower but not initcap.
> >>
> > I saw this inconsistence while I'm doing the patch. What about moving
> > that upper/l
Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Also, it seems a bit inconsistent to be relying on
>> oracle_compat.c for upper/lower but not initcap.
>>
> I saw this inconsistence while I'm doing the patch. What about moving
> that upper/lower/initcap and wcs* code to
Tom Lane wrote:
Also, it seems a bit inconsistent to be relying on
oracle_compat.c for upper/lower but not initcap.
I saw this inconsistence while I'm doing the patch. What about moving
that upper/lower/initcap and wcs* code to another file. pg_locale.c?
BTW, formatting.c and oracle_compat.c
Bruce Momjian <[EMAIL PROTECTED]> writes:
> Now that upper/lower/initcase do not modify the passed string, I have
> simplified formatting.c with the attached patch.
I was thinking the same thing while reading the patch. But please,
make str_toupper() and friends declare their argument "const" if
Now that upper/lower/initcase do not modify the passed string, I have
simplified formatting.c with the attached patch.
--
Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can
16 matches
Mail list logo