Describe the bug
As title says, the node-sql-parser fails when trying to astify a postgres query containing IS DISTINCT FROM TRUE in WHERE clause.
Database Engine
PostgreSQL
To Reproduce
Query:
SELECT * FROM my_table a WHERE a.value IS DISTINCT FROM TRUE
node-sql-parser version: 5.4.0
node version: 22.18.0
Expected behavior
astify should succeed; the query is valid, instead the error below is thrown.
Screenshots
Error message and stack trace:
Error running fn s68 [SyntaxError]: Expected [A-Za-z0-9_\-$一-龥À-ſ] but end of input found.
at Jl2 (/.../dist/index.js)
at Object.parse [as postgresql] (/.../dist/index.js)
at r49.value (/.../dist/index.js)
at r49.value (/.../dist/index.js)
... {
expected: [
{
type: 'class',
parts: [Array],
inverted: false,
ignoreCase: false
}
],
found: null,
location: {
start: { offset: 60, line: 1, column: 61 },
end: { offset: 60, line: 1, column: 61 }
}
}
Describe the bug
As title says, the node-sql-parser fails when trying to
astifya postgres query containingIS DISTINCT FROM TRUEinWHEREclause.Database Engine
PostgreSQL
To Reproduce
Query:
SELECT * FROM my_table a WHERE a.value IS DISTINCT FROM TRUEnode-sql-parser version: 5.4.0
node version: 22.18.0
Expected behavior
astifyshould succeed; the query is valid, instead the error below is thrown.Screenshots
Error message and stack trace: