cockroachdb / cockroachdb/cockroach
sql: support forward indexing on tsvector
Open
A-tools-efcore
C-bug
O-community
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
Given a table created using the following SQL
```
CREATE TABLE "Blogs" (
"Description" text,
"Title" text NOT NULL
);
```
Run the following SQL to create a new index
```
CREATE INDEX ""IX_Blogs_Title_Description"" ON ""Blogs"" (to_tsvector('simple', ""Title"" || ' ' || coalesce(""Description"", '')));
```
The following error is returned
```
42P16: index element to_tsvector('simple', ("Title" || ' ') || COALESCE("Description", '')) of type tsvector is not indexable in a non-inverted index
```
**Additional context**
This affects efcore.pg tests
@fqazi
Jira issue: CRDB-31636
Contributor guide
Assessment
This issue has not been assessed yet.