Re: simple text parsing function - Mailing list pgsql-sql

From John DeSoi
Subject Re: simple text parsing function
Date
Msg-id 9612A471-F6C4-4E1F-824A-833C69F862CF@pgedit.com
Whole thread Raw
In response to simple text parsing function  ("Kevin Duffy" <KD@wrinvestments.com>)
List 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.






pgsql-sql by date:

Previous
From: Zagato
Date:
Subject: Re: Interval Format
Next
From: "Pascal Tufenkji"
Date:
Subject: Permission denied for create table