Re: BUG #14441: trim function bug (hit a keyword somewhere internally)

From: mark pether <mark(dot)pether(at)gmail(dot)com>
To: David Gould <daveg(at)sonic(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14441: trim function bug (hit a keyword somewhere internally)
Date: 2016-11-30 06:16:16
Message-ID: CAEnjbrTZ+GMF_XCV1r4Q42TLv3mR_EAeutUGTE8=Fn3nTrTxRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sorry, I misread the document it's not a bug, doco was unclear.

It replaces the largest match which may be all characters or simply
individual characters. I realised this after I created the bug.

I have switched to REGEXP_REPLACE to do the correct operation.

Regards

On Wed, Nov 30, 2016 at 5:09 PM, David Gould <daveg(at)sonic(dot)net> wrote:

> On Wed, 30 Nov 2016 01:17:10 +0000
> mark(dot)pether(at)gmail(dot)com wrote:
>
> > The following bug has been logged on the website:
> >
> > Bug reference: 14441
> > Logged by: mark pether
> > Email address: mark(dot)pether(at)gmail(dot)com
> > PostgreSQL version: 9.5.4
> > Operating system: macos
> > Description:
> >
> > select TRIM(LEADING 'EXCLUDE' FROM 'C001');
> >
> > Will incorrectly strip off the 'C' leaving '001'.
>
>
> Perhaps I'm misreading the doc, but that looks like the correct result.
> That is, any character in 'EXCLUDE' will be stripped from the leading part
> of
> 'C001', ie, the 'C'. Why do you think this is a bug?
>
> -dg
>
>
>
> --
> David Gould daveg(at)sonic(dot)net
> If simplicity worked, the world would be overrun with insects.
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-11-30 06:24:04 Re: BUG #14441: trim function bug (hit a keyword somewhere internally)
Previous Message David Gould 2016-11-30 06:09:32 Re: BUG #14441: trim function bug (hit a keyword somewhere internally)