| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
| Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
| Subject: | Re: Simplify formatting.c |
| Date: | 2008-06-18 18:43:42 |
| Message-ID: | 200806181843.m5IIhgm03448@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
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
> > > 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.
>
> I talked to Alvaro on IM, and there is certainly much more cleanup to do
> in this area. I will work from the bottom up. First, is moving the
> USE_WIDE_UPPER_LOWER define to c.h, and removing TS_USE_WIDE and using
> USE_WIDE_UPPER_LOWER instead. Patch attached and applied.
The second step is to move wchar2char() and char2wchar() from tsearch
into /mb to be easier to use for other modules; also move pnstrdup().
Patch attached and applied.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| Attachment | Content-Type | Size |
|---|---|---|
| /rtmp/diff | text/x-diff | 11.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2008-06-18 22:41:05 | Re: [HACKERS] Hint Bits and Write I/O |
| Previous Message | Tom Lane | 2008-06-18 18:19:34 | Rewrite sinval messaging to reduce contention |