I'm running Postgres 7.0.3 on a RedHat Linux 6.1. For some reason, rtrim
is giving me an incorrect result:
db01=# SELECT tablename FROM pg_tables WHERE tablename LIKE '%_opto' AND
tablename NOT LIKE 'pg%' ORDER BY tablename ASC ;
tablename
-
center_out_opto
circles_opto
e
"G. Anthony Reina" <[EMAIL PROTECTED]> writes:
> I'm running Postgres 7.0.3 on a RedHat Linux 6.1. For some reason, rtrim
> is giving me an incorrect result:
No, you have an incorrect understanding of rtrim. The second argument
is a set of removable characters, not a string to be matched.
AFAIK
is not in the set {o, p, t, _} but all the characters after it
are.
rtrim("center_out_opto", "pot_") will produce the same thing.
- Original Message -
From: "G. Anthony Reina" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]&g
Ken Hirsch wrote:
> So rtrim("center_out_opto", "_opto") returns
> "center_ou"
> because "u" is not in the set {o, p, t, _} but all the characters after it
> are.
> rtrim("center_out_opto", "pot_") will produce the same thing.
>
That seems like an odd definition (although as Tom points out,
On Thu, Mar 15, 2001 at 09:34:04AM -0800, G. Anthony Reina wrote:
> Ken Hirsch wrote:
>
> > So rtrim("center_out_opto", "_opto") returns
> > "center_ou"
> > because "u" is not in the set {o, p, t, _} but all the characters after it
> > are.
> > rtrim("center_out_opto", "pot_") will produce th
"Ross J. Reedstrom" <[EMAIL PROTECTED]> writes:
>> Is there a way to just remove the "_opto" from the end of the string?
> If you have exactly one known string to (optionally) remove, this works
> (and even works if the string is missing. Watch out for the early
> occurance of substring problem,
On Thu, Mar 15, 2001 at 01:18:57PM -0500, Tom Lane wrote:
> "Ross J. Reedstrom" <[EMAIL PROTECTED]> writes:
> >> Is there a way to just remove the "_opto" from the end of the string?
>
> > If you have exactly one known string to (optionally) remove, this works
> > (and even works if the string is