Re: simple text parsing function

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Kevin Duffy <KD(at)wrinvestments(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: simple text parsing function
Date: 2008-11-22 15:48:11
Message-ID: 9612A471-F6C4-4E1F-824A-833C69F862CF@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Nov 21, 2008, at 3:35 PM, Kevin Duffy wrote:

> select getrfs_bbcode('BPZ8 CURNCY ', NULL, NULL);
> returns nothing. I need to receive 'BPZ8 CURNCY ' in
> this case.
>
>
> What am I missing?

I think it is because of your choice of types:

select rtrim('BPZ8 CURNCY ') like '%CURNCY'; --> true

select rtrim('BPZ8 CURNCY ')::char(25) like '%CURNCY'; --> false

Interestingly, it works if you make your comparison using ~ '.*CURNCY'

John DeSoi, Ph.D.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Pascal Tufenkji 2008-11-24 06:50:25 Permission denied for create table
Previous Message Zagato 2008-11-22 02:31:36 Re: Interval Format