X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 68628D1D621 for ; Thu, 22 Apr 2004 23:34:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 20250-07 for ; Thu, 22 Apr 2004 23:34:17 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5D67BD1D391 for ; Thu, 22 Apr 2004 23:34:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3N2YGhg014820; Thu, 22 Apr 2004 22:34:16 -0400 (EDT) To: Janning Vygen Cc: pgsql-sql@postgresql.org Subject: Re: Is there an easy way to normalize-space with given string functions In-reply-to: <200404230059.14221.vygen@gmx.de> References: <200404230059.14221.vygen@gmx.de> Comments: In-reply-to Janning Vygen message dated "Fri, 23 Apr 2004 00:59:13 +0200" Date: Thu, 22 Apr 2004 22:34:16 -0400 Message-ID: <14819.1082687656@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/246 X-Sequence-Number: 17621 Janning Vygen writes: > i searched the function list and tried to combine to or more > functions, but i miss a replace function which uses regular > expressions. There isn't one in the SQL standard. Most people who need one write a one-liner function in plperl or pltcl. (Mind you, I don't know why we don't offer a built-in one --- the needed regex engine is in there anyway. I guess no one has gotten around to getting agreement on a syntax.) regards, tom lane