Re: [GENERAL] Regexp match not working.. (SQL help)

2011-05-12 Thread Phoenix Kiula
On Wed, May 11, 2011 at 11:18 PM, Phoenix Kiula wrote: > I have a text column in a table, which I want to search through -- > seeking the occurrence of about 300 small strings in it. > > Let's say the table is like this: > >    table1 ( >         id   bigint primary key >        ,mytext   text >  

Re: [GENERAL] Regexp match not working.. (SQL help)

2011-05-11 Thread David Johnston
> > I am using this SQL: > >SELECT id FROM table1 >WHERE mytext ~* E'sub1|sub2|sub3|sub4...' >LIMIT 10; > > This is basically working, but some of the "mytext" columns being returned > that do not contain any of these substrings. Am I doing the POSIX regexp > wrongly? This same

Re: [GENERAL] Regexp match not working.. (SQL help)

2011-05-11 Thread Tom Lane
Phoenix Kiula writes: > I am using this SQL: >SELECT id FROM table1 >WHERE mytext ~* E'sub1|sub2|sub3|sub4...' >LIMIT 10; > This is basically working, but some of the "mytext" columns being > returned that do not contain any of these substrings. [ raised eyebrow... ] Could we

[GENERAL] Regexp match not working.. (SQL help)

2011-05-11 Thread Phoenix Kiula
I have a text column in a table, which I want to search through -- seeking the occurrence of about 300 small strings in it. Let's say the table is like this: table1 ( id bigint primary key ,mytext text ,mydate timestamp without time zone ); I am using this