database - Using a sub-string of the column name in creating index in CockroachDB -


moving oracle cockroachdb, i'm using index creating command below:

create index on "sales" (substring("a",0,19), substring("b",20,2), "c");

the error is:

invalid syntax: statement ignored: unimplemented @ or near ")" create index on "sales" (substring("a",0,19), substring("b",20,2), "c"); 

i have used: substr

but error same.

--

edit1: error modified command

create index on "sales" (substring("a",0,19));

will same.

you're trying use computed index - index keys more complex column references. cockroachdb doesn't support computed indexes yet.

there's open issue adding support computed indexes:

https://github.com/cockroachdb/cockroach/issues/9682


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -