Search Postgresql Archives

Re: Regexp match not working.. (SQL help)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phoenix Kiula <phoenix.kiula@xxxxxxxxx> 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 see a concrete example?

One potential issue is that, depending on which PG version and locale
and database encoding you are using, case-insensitive matching might
not work properly on non-ASCII letters.  Other than that, the only
gotcha I can think of is having regexp special characters in the
substrings and failing to escape them properly.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux