Re: blank in query - cannot return results

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: blank in query - cannot return results
Дата
Msg-id 5616CC1D.9050901@aklaver.com
обсуждение исходный текст
Ответ на blank in query - cannot return results  (Emi <emilu@encs.concordia.ca>)
Список pgsql-general
On 10/08/2015 12:51 PM, Emi wrote:
> Hello,
>
> PostgreSQL 8.3.18  on x86_64-linux-gnu, query:
>
> select * from table_name where col1 =    'Abc, test';
> select * from table_name where col1 ilike '%Abc, test%';
>
> NO result returned.

Well without an indication of what the value in col1 is this is not
going anywhere.


My suspicion is you are looking for regex:

http://www.postgresql.org/docs/9.4/interactive/functions-matching.html#FUNCTIONS-POSIX-REGEXP

>
>
> But run:
> select * from table_name where col1 ilike '%Abc,%test%';   -- remove blank
>
> Result is returned.
>
>
>
> PSQL terminal encoding: unicode (UTF-8). From both terminal and db,
> values shows/and displayed as "Abc, test".
>
> But " " space/blank in where section cannot return query result.
>
> Can someone tell why may cause the issue please?
>
> Thanks a lot!
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Emi
Дата:
Сообщение: Re: blank in query - cannot return results
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: postgres standby won't start