Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL ^@ operator causes parse error #79

Open
nene opened this issue Apr 23, 2024 · 1 comment
Open

PostgreSQL ^@ operator causes parse error #79

nene opened this issue Apr 23, 2024 · 1 comment

Comments

@nene
Copy link
Owner

nene commented Apr 23, 2024

The following fails to parse:

SELECT 'foo' ^@ ANY = '{f,b}'
Syntax Error: Unexpected "ANY"
Was expecting to see: "$", "(", "+", "-", ":", "?", "@", "ARRAY", "CASE", "CAST", "CURRENT_CATALOG", "CURRENT_DATE", "CURRENT_DATETIME", "CURRENT_ROLE", "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DATE", "DATETIME", "EXISTS", "EXTRACT", "FALSE", "INTERVAL", "JSON", "JSONB", "LOCALTIME", "LOCALTIMESTAMP", "NULL", "OPERATOR", "ROW", "SAFE_CAST", "SESSION_USER", "SYSTEM_USER", "TIME", "TIMESTAMP", "TRUE", "USER", "X", "b", "~", identifier, number, string, or whitespace
--> undefined:2:17
  |
2 | SELECT 'foo' ^@ ANY = '{f,b}'
  |                 ^

See also: sql-formatter-org/sql-formatter#734

@felixfbecker
Copy link

FYI I made a mistake in the code snippet, it should be

SELECT 'foo' ^@ ANY ('{f,b}')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants