From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Woody Woodring <george(dot)woodring(at)iglass(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: String trim function - possible bug? |
Date: | 2007-06-06 16:50:14 |
Message-ID: | 20070606165014.GE8997@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 06, 2007 at 12:21:33PM -0400, Woody Woodring wrote:
> I am seeing weirdness using the trim function on a string:
<snip>
You are missunderstanding the trim function.
> However it fails for these cases:
>
> SELECT 'dhct:dn', trim(leading 'dhct:' from 'dhct:dn');
> ?column? | ltrim
> ----------+-------
> dhct:dn | n
> (1 row)
The bit after the leading is the set of *characters* to be removed.
Like so:
# select trim( leading 'dhct:' from 'dhdhda');
ltrim
-------
a
(1 row)
It's matching characters, not the exact string...
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2007-06-06 17:33:15 | Re: String trim function - possible bug? |
Previous Message | Martijn van Oosterhout | 2007-06-06 16:34:00 | Re: plperl and/or insert trigger problem |