Search Postgresql Archives

Re: full text search on hstore or json with materialized view?

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

 



On Thu, 20 Apr 2017 00:55:48 -0400, George Neuner
<gneuner2@xxxxxxxxxxx> wrote:

Doh!

>  SELECT count(distinct s.id)
>    FROM  samples_lg_txt AS s
>    JOIN  keys AS k ON k.id = s.key
>    WHERE (k.name = 'key1' AND s.tsv @@ to_query('value1')
>       OR (k.name = 'key2' AND s.tsv @@ to_query('value2')
>
>  :
>
>  SELECT count(distinct id)
>    FROM  samples_lg_txt
>    WHERE (key = 'key1' AND tsv @@ to_query('value1')
>       OR (key = 'key2' AND tsv @@ to_query('value2')


All the WHERE clauses need closing parentheses.

Time for bed,
George



-- 
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