Skip to content
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

Create composite index with non jsonb (like varchar) and jsonb #26548

Closed
akshath opened this issue Jun 8, 2018 · 3 comments
Closed

Create composite index with non jsonb (like varchar) and jsonb #26548

akshath opened this issue Jun 8, 2018 · 3 comments
Labels
X-duplicate Closed as a duplicate of another issue.

Comments

@akshath
Copy link

akshath commented Jun 8, 2018

Hi Team,

I am trying to create a composite index with non-jsonb (like varchar) and jsonb and I am getting error.

I tried the following variations. Is this supported? I am using latest version of cockroach 2.0.2. Thank you.

CREATE INDEX ON table_a (a, b DESC, c->>'d');
CREATE INDEX ON table_a (a, b DESC, (c->>'d'));

@jordanlewis
Copy link
Member

Hi @akshath,

We don't support indexes with computed expressions at the moment. To make this work, you'll need to make a computed column on c->>'d' and put the index on that.

@akshath
Copy link
Author

akshath commented Jun 8, 2018

Thanks, Jordan for the quick reply. Hope to see this supported in a future release.

@knz
Copy link
Contributor

knz commented Jul 21, 2018

This is a duplicate of #9682. We'll support this eventually.

@knz knz closed this as completed Jul 21, 2018
@knz knz added the X-duplicate Closed as a duplicate of another issue. label Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-duplicate Closed as a duplicate of another issue.
Projects
None yet
Development

No branches or pull requests

3 participants