-
Notifications
You must be signed in to change notification settings - Fork 540
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
question: malformed insert statement when calling create_table
with Postgres backend
#6666
Comments
thanks for the report @dantegates! we'll look into this and update here |
I am able to execute this I suspect this is an issue with the postgres version you're using: it looks like support for this was added in postgres 9.1. Are you using postgres 9 or earlier? The oldest version of postgres supported by postgres itself is 11, so we won't be doing anything beyond best effort for versions older than 11 in ibis. |
create_table
with Postgres backendcreate_table
with Postgres backend
@cpcloud thanks for looking into this. For posterity, I was technically executing this against a Redshift backend, so perhaps that was why you were unable to reproduce the error? In any event, in my case this looks to be an issue with |
@dantegates glad it's fixed, did you have to upgrade |
Just to follow up on this, then SQL alchemy developers confirmed this is really an issue with using the |
What happened?
When trying to create tables form expressions which compile to SQL containing a CTE clause, the insert statements render with a syntax error - placing the
insert into ...
in the middle of the statement, rather the beginning.E.g. the following code
When I call
ibis_connection.create_table('test', X)
,sqlalchemy
throwsSyntaxError: syntax error at or near "INSERT"
due the following insert statement (note thatinsert into
should begin the statement)What version of ibis are you using?
6.0.0
What backend(s) are you using, if any?
Postgres
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: