String substitution with "translate" function - Mailing list pgsql-general

From Jeff Eckermann
Subject String substitution with "translate" function
Date
Msg-id 08CD1781F85AD4118E0800A0C9B8580B0947C1@NEZU
Whole thread Raw
List pgsql-general
(My first attempt at posting didn't make it to my mailbox, so I am
reposting.  Apologies to any who get this twice.)

I have been trying to use the translate function to delete a specific string
from entries in a particular column, as in "translate(<column>, 'string',
'')".
What I find is that "translate" is treating the nominated string as a
character class, and is deleting every instance of every character in that
class....
I have tried every which way, but cannot get the behaviour I want.  Is it
possible, or am I just seeing the builtin behaviour of "translate", which
cannot be worked around?
TIA


pgsql-general by date:

Previous
From: "Adam Lang"
Date:
Subject: Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL