GlareDB/glaredb

Allow parenthesis for `INSERT INTO (SELECT *);` statements

talagluck opened this issue · 2 comments

Description

I would expect this to work:

insert into my_table
(select * from my_other_table)

It currently doesn't work with the parentheses. This will work though:

insert into my_table
select * from my_other_table

I've hit this issue on my own a few times - I wouldn't expect parentheses would break the insert statement, and I use parentheses pretty freely in my queries. It's also a problem when using incremental tables with dbt using the dbt postgres-adapter, since it automatically compiles the dbt model using parentheses.

This would be a change in the sqlparser crate. Not sure if there's an open issue for this. I couldn't find one though.