Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 30BDA1337B96 for ; Wed, 11 May 2011 18:08:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 61304-06 for ; Wed, 11 May 2011 21:08:16 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id BECE61337BBB for ; Wed, 11 May 2011 18:08:15 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p4BL8FiA033748 for ; Wed, 11 May 2011 18:08:15 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p4BKrcGb071218 for pgsql-sql@postgresql.org; Wed, 11 May 2011 17:53:38 -0300 (ADT) (envelope-from news) From: Lew X-Newsgroups: pgsql.sql Subject: Re: replace " with nothing Date: Wed, 11 May 2011 16:53:42 -0400 Organization: albasani.net Lines: 24 Message-ID: References: <1305145780.1954.4.camel@tony1.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: news.albasani.net; logging-data="n0K69sd4bUBaE+5OkNDVhZxxKvxhGSIHD6aasbLWRaGRRY8CWQ2Q3GiHMZekxjpEQvBgd4g9eooJbglnTgIy03vuWeb7wUp03ruOu5F5TT7dHzRG/Bl26UlI+sQyPxdc"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 In-Reply-To: <1305145780.1954.4.camel@tony1.localdomain> Cancel-Lock: sha1:SmPfKmdjhDMt6s97tmjzIXdbdWE= To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-5 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/84 X-Sequence-Number: 35368 Tony Capobianco wrote: > We are converting from Oracle to Postgres. An Oracle script contains > this line: > > select replace(firstname,'"'), memberid, emailaddress from members; > > in an effort to replace the " with nothing. How can I achieve the same > result with Postgres? > > Here's the Postgres error I get: > > select replace(firstname,'"'), memberid, emailaddress from members; > ERROR: function replace(character varying, unknown) does not exist > LINE 1: select replace(firstname,'"'), memberid, emailaddress from m... replace(string text, from text, to text) -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg