Re: rtrim giving weird result

From: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
To: Ken Hirsch <kenhirsch(at)myself(dot)com>
Cc: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: rtrim giving weird result
Date: 2001-03-15 17:34:04
Message-ID: 3AB0FD0C.AB9B72CC@nsi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, it is
consistent with Oracle).

Is there a way to just remove the "_opto" from the end of the string?

-Tony

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alfred Perlstein 2001-03-15 17:44:15 Re: Allowing WAL fsync to be done via O_SYNC
Previous Message Tom Lane 2001-03-15 17:29:52 Allowing WAL fsync to be done via O_SYNC