auxten / postgresql-parser

Pure Golang PostgreSQL (SQL:2011, SQL:2008, SQL:2003, SQL:1999, and SQL-92 Standard) Parser
Apache License 2.0
273 stars 50 forks source link

at or near "@": syntax error #12

Open localhosted opened 2 years ago

localhosted commented 2 years ago

How can I add ts_vector query support?

It's choking on WHERE to_tsvector(unaccent(name)) @@ to_tsquery('portuguese', ':*')

auxten commented 2 years ago

Can you provide the full SQL? Which database and version does this SQL run on?

localhosted commented 2 years ago

It's from the extension pg_trgm

Runs on postgres 9.6+

SELECT
    * 
FROM
    movies 
WHERE
    to_tsvector( unaccent ( NAME ) ) @@to_tsquery( 'portuguese', 'star:*' )
mal-mel commented 4 months ago

yeah, i have the similar problem SELECT * FROM table_name WHERE column1 @@ '$.key == "value"'