translate function - Mailing list pgsql-general

From Don V. Soledad
Subject translate function
Date
Msg-id 5.2.0.9.0.20030502112838.02e48e50@localhost
Whole thread Raw
Responses Re: translate function
List pgsql-general
good day!

how could i use the function translate to output the replacement of the
exact occurrence of the 2nd parameter?

for instance,
    select translate('Juan dela Cruz C/O ABC Co.','C/O','c/o');
gives
             translate
    ----------------------------
     Juan dela cruz c/o ABc co.

i would like the output to be "Juan dela Cruz c/o ABC Co." instead of "Juan
dela cruz c/o ABc co." could i do this with the above function, or are
there any functions that could do this?

thank you very much!


pgsql-general by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: qsort (was Re: Solaris)
Next
From: Tom Lane
Date:
Subject: Re: Updating a table which is null doesn't work?