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

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: full text search on hstore or json with materialized view?
Date: 2017-04-20 05:00:09
Message-ID: stfgfcd1sm7oi9tvga0kg9kaj1069q3cvb@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 20 Apr 2017 00:55:48 -0400, George Neuner
<gneuner2(at)comcast(dot)net> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-04-20 05:22:47 Re: referential integrity between elements of an array and another table?
Previous Message George Neuner 2017-04-20 04:55:48 Re: full text search on hstore or json with materialized view?