Re: [SQL] Search and Replace

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Randy D(dot) McCracken" <rdm(at)srs(dot)fs(dot)usda(dot)gov>
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>, pgsql-sql(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: [SQL] Search and Replace
Date: 2003-01-10 00:38:54
Message-ID: 20030110003854.GA22030@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

On Thu, Jan 09, 2003 at 19:15:51 -0500,
"Randy D. McCracken" <rdm(at)srs(dot)fs(dot)usda(dot)gov> wrote:
>
> Hi Rajesh,
>
> I don't know why but the example you gave me did not work. Here is what
> happened when I tried:
>
> ==========
>
> pubs_test=# UPDATE publications SET url = replace( 'www.srs.fs.fed.us' ,
> 'www.srs.fs.usda.gov' , url ) WHERE url ilike '%www.srs.fs.fed.us%';
>
> ERROR: Function 'replace(unknown, unknown, text)' does not exist
> Unable to identify a function that satisfies the given argument types
> You may need to add explicit typecasts

The arguments to replace were in the wrong order.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Phillip J. Allen 2003-01-10 00:50:49 How to list schemas and table in psql?
Previous Message Randy D. McCracken 2003-01-10 00:15:51 Re: [SQL] Search and Replace

Browse pgsql-sql by date

  From Date Subject
Next Message Maurício Sessue Otta 2003-01-10 00:48:11 Getting sequence value after inserting many rows at a time
Previous Message Randy D. McCracken 2003-01-10 00:15:51 Re: [SQL] Search and Replace