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

Re: Simplify formatting.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Simplify formatting.c
Date: 2008-05-20 02:29:04
Message-ID: 13542.1211250544@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Bruce Momjian <bruce(at)momjian(dot)us> 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 you're
going to do this.

Another issue in this area is that these functions could do with some
refactoring to eliminate useless text/cstring conversions; I'm pretty
sure some code paths are doing cstring->text->cstring in direct
succession.  Also, it seems a bit inconsistent to be relying on
oracle_compat.c for upper/lower but not initcap.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2008-05-20 02:37:58
Subject: Re: libpq object hooks (libpq events)
Previous:From: Andrew ChernowDate: 2008-05-20 02:21:07
Subject: Re: libpq object hooks (libpq events)

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