From: | Kiran <bangalore(dot)kiran(at)gmail(dot)com> |
---|---|
To: | obartunov(at)gmail(dot)com |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Results in ERROR: syntax error in tsquery: |
Date: | 2016-09-19 09:48:02 |
Message-ID: | CAJfd1U4wNpXerkXoJrgj5Mne51jKUQ05pSHD6u1B2uVwE7+L+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Thanks for the reply. It worked.
But I also fixed the original ts_query as follows which gives the exact
result
SELECT * from question
where
weighted_tsv @@ to_tsquery('Hur&ofta');
Thank you .
regards
Kiran
On Mon, Sep 19, 2016 at 11:21 AM, Oleg Bartunov <obartunov(at)gmail(dot)com> wrote:
> On Mon, Sep 19, 2016 at 4:19 AM, Oleg Bartunov <obartunov(at)gmail(dot)com>
> wrote:
> > On Mon, Sep 19, 2016 at 3:46 AM, Kiran <bangalore(dot)kiran(at)gmail(dot)com>
> wrote:
> >> Dear All,
> >>
> >> I have a ts_vector column in question table called weighted_tsv.
> >> I am trying to search using ts_query as follows
> >>
> >> SELECT *
> >>
> >> FROM question
> >>
> >> WHERE weighted_tsv @@ to_tsquery('Hur ofta');
> >
> > you should use to_tsquery('Hur & ofta') ! Read
> > https://www.postgresql.org/docs/9.5/static/datatype-textsearch.html
>
> or use plainto_tsquery('Hur ofta')
>
> >
> >>
> >>
> >> But the query results in an error as follows:
> >>
> >> ERROR: function ts_query(unknown) does not exist
> >>
> >> LINE 1: ...* from question where weighted_tsv @@ ts_query('...
> >>
> >> HINT: No function matches the given name and argument types. You might
> need
> >> to add explicit type casts.
> >>
> >>
> >> What is the reason I am getting this error I am not able to figure it
> out.
> >>
> >> It would be of great help if anyone point me into right direction.
> >>
> >>
> >> Thanks
> >>
> >> Kiran
> >>
> >>
> >>
> >>
>
From | Date | Subject | |
---|---|---|---|
Next Message | MEERA | 2016-09-19 11:18:58 | Re: PgSQL versions supported on ubuntu 16 and debian 8 |
Previous Message | Oleg Bartunov | 2016-09-19 09:21:08 | Re: Results in ERROR: syntax error in tsquery: |