String substitution with "translate" function

From: Jeff Eckermann <jeckermann(at)verio(dot)net>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: String substitution with "translate" function
Date: 2000-11-15 19:13:14
Message-ID: 08CD1781F85AD4118E0800A0C9B8580B0947C1@NEZU
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-15 19:15:59 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Previous Message Don Baccus 2000-11-15 19:09:06 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL