Skip site navigation (1) Skip section navigation (2)

Re: Simplify formatting.c

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Simplify formatting.c
Date: 2008-06-14 21:29:42
Message-ID: 20080614212942.GD8519@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-patches
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 char,
> then to text to call texttowcs().  I didn't see a cleaner way to do
> this.

Why not use wchar2char?  It seems there's room for extra cleanup here.

Also, the prototype of str_initcap in builtins.h looks out of place.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2008-06-14 23:49:01
Subject: Re: relscan.h split
Previous:From: Andrew DunstanDate: 2008-06-14 18:21:54
Subject: Re: Tentative patch for making DROP put dependency info in DETAIL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group