pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15751: Unexpected behaviour at plainto_tsquery funciton
2+ messages / 2 participants
[nested] [flat]

* BUG #15751: Unexpected behaviour at plainto_tsquery funciton
@ 2019-04-13 21:11  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-04-13 21:11 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: ozan.gerdaneri@gmail.com

The following bug has been logged on the website:

Bug reference:      15751
Logged by:          Ozan Gerdaneri
Email address:      ozan.gerdaneri@gmail.com
PostgreSQL version: 11.0
Operating system:   win 10
Description:        

Hi, 
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?
                                                             ^
********** Error **********

ERROR: column "cat" does not exist
SQL state: 42703
Character: 511



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #15751: Unexpected behaviour at plainto_tsquery funciton
@ 2019-04-13 21:27  Daniel Gustafsson <dgustafsson@pivotal.io>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2019-04-13 21:27 UTC (permalink / raw)
  To: ozan.gerdaneri@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

> On 13 Apr 2019, at 23:11, PG Bug reporting form <noreply@postgresql.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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-04-13 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 21:11 BUG #15751: Unexpected behaviour at plainto_tsquery funciton PG Bug reporting form <noreply@postgresql.org>
2019-04-13 21:27 ` Daniel Gustafsson <dgustafsson@pivotal.io>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox