-
Notifications
You must be signed in to change notification settings - Fork 1
syntax error at or near "do" - DO $$ BEGIN CREATE INDEX (...);EXCEPTION WHEN duplicate_table THEN END; $$; #4
Comments
Maybe this alternative way of expressing a |
Hi zoltanmaric, Ya, CDB does not support the I am not exactly sure why they actually do this, might worth opening an issue there to inquiry about it. |
Scratch that, I know why they are using this syntax, it is simply because they are not leveraging yet support for They are actually already using the syntax with Seems like a good opportunity for a little contribution to ecto-sql 😃 |
Created elixir-ecto/ecto_sql#247 to track this. |
Closed with elixir-ecto/ecto_sql#253 |
Thanks for sorting this out so quickly @tlvenn 👏 ❤️ And congrats on the merged pull request in Ecto! |
Hi! First of all, thanks for creating this adaptor! 🙂
I tried to use
create_if_not_exists
to create an index in anecto
migration, but it generates SQL that Cockroach doesn't seem to support:I tried to paste the same command into a cockroach console, and I got the same result:
It seems like Cockroach (or at least my version of it) doesn't support the
DO $$ ... $$;
syntax.I believe the statement is generated here.
Here's my Cockroach version:
Is there some way around this issue?
The text was updated successfully, but these errors were encountered: