X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6874E9DCDB1 for ; Mon, 13 Mar 2006 18:55:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79602-08 for ; Mon, 13 Mar 2006 18:56:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by postgresql.org (Postfix) with ESMTP id 610B69DC8AC for ; Mon, 13 Mar 2006 18:55:56 -0400 (AST) Received: from [132.205.47.205] (IDENT:emilu@curacao.encs.concordia.ca [132.205.47.205]) by perseverance.encs.concordia.ca (8.12.11/8.12.11) with ESMTP id k2DMttLp004129; Mon, 13 Mar 2006 17:55:55 -0500 Message-ID: <4415F87A.9040506@encs.concordia.ca> Date: Mon, 13 Mar 2006 17:55:54 -0500 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alvaro Herrera CC: pgsql-sql@postgresql.org Subject: Re: [GENERAL] Update value to "the first character is capital References: <4415F2C0.3040707@encs.concordia.ca> <20060313223604.GF18322@surnet.cl> In-Reply-To: <20060313223604.GF18322@surnet.cl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/03/13 17:55:55 EST X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.138 required=5 tests=[AWL=0.138] X-Spam-Score: 0.138 X-Spam-Level: X-Archive-Number: 200603/205 X-Sequence-Number: 24551 I saw it from the docs as well. Thank you Alvaro :) Alvaro Herrera wrote: >Emi Lu wrote: > > >>Hello all, >> >>Does anyone have available plpgsql codes to update all capital letters >>in a column to "the first character is capital and the rest is small" ? >> >> > >I don't know about plpgsql codes, but there is a function initcap() that >you can use for that. > >alvherre=# select initcap('GU & WEI. NAN (CE SHI) & TOMMORROW'); > initcap >------------------------------------ > Gu & Wei. Nan (Ce Shi) & Tommorrow >(1 row) > > >