You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A certain postgresql query statement causes a "script error" since version 10.0.0.
It doesn't happen in version 9.2.0.
Expected behavior
It should work fine on all versions.
Actual behavior
[NORMAL QUERY]
with A_TABLE as (
select
1 as a
,2 as b
,now() as c
union all
select
1 as a
,6 as b
,now() - interval'1 minute' as c
union all
select
1 as a
,6 as b
,now() - interval'1 day' as c
)
select * from A_TABLE
where a > 0
and b > 0
and c between (now() - interval'1 hour') and now()
[OTHER QUERY]
with A_TABLE as (
select
1 as a
,2 as b
,now() as c
union all
select
1 as a
,6 as b
,now() - interval'1 minute' as c
union all
select
1 as a
,6 as b
,now() - interval'1 day' as c
)
select * from A_TABLE
where a > 0
and b > 0
and c between now() - interval'1 hour' and now()
The above jsfiddle environment is version 10.0.0.
When testing with a 'NORMAL QUERY' and an 'OTHER QUERY', the results of the two queries are different. There is a difference of one parenthesis in the between clause!
Usage
How are you calling / using the library? npm install
What SQL language(s) does this apply to? postgresql
Which SQL Formatter version are you using? 9.2.0 vs. 10.0.0
The text was updated successfully, but these errors were encountered:
Describe the bug
A certain postgresql query statement causes a "script error" since version 10.0.0.
It doesn't happen in version 9.2.0.
Expected behavior
It should work fine on all versions.
Actual behavior
[NORMAL QUERY]
[OTHER QUERY]
The above jsfiddle environment is version 10.0.0.
When testing with a 'NORMAL QUERY' and an 'OTHER QUERY', the results of the two queries are different.
There is a difference of one parenthesis in the between clause!
option object used in jsfiddle
Usage
How are you calling / using the library? npm install
What SQL language(s) does this apply to? postgresql
Which SQL Formatter version are you using? 9.2.0 vs. 10.0.0
The text was updated successfully, but these errors were encountered: