Re: BUG #15751: Unexpected behaviour at plainto_tsquery funciton

From: Daniel Gustafsson <dgustafsson(at)pivotal(dot)io>
To: ozan(dot)gerdaneri(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15751: Unexpected behaviour at plainto_tsquery funciton
Date: 2019-04-13 21:27:53
Message-ID: CD777B0C-3530-4B7F-B781-BCF1EB72D63B@pivotal.io
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 13 Apr 2019, at 23:11, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:

>
> My query is like this :
> .......
> WHERE to_tsvector(COALESCE("blog"."name" )) @@ (plainto_tsquery("cat")) =
> true
>
> That is, I am searching for the word "cat" in name column. But the following
> error is given. Why is plainto_tsquery is looking for a column name?
> ^

Quoted strings become SQL identifiers, what you want to do is using single
quotes in order to make it a string: 'cat'

cheers ./daniel

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Sandeep Thakkar 2019-04-14 10:08:33 Re: Error occurred when i install in my pc.
Previous Message PG Bug reporting form 2019-04-13 21:11:30 BUG #15751: Unexpected behaviour at plainto_tsquery funciton