You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support jsonb for HasGeneratedTsVectorColumn #2215
@toklive I'm not sure how tsvector would be compatible with arrays specifically... In any case, I'd recommend looking at general PostgreSQL documentation - if you can define a generated tsvector column over array/jsonb, you should be able to follow the Npgsql instructions as they are.
Let me know if you run into any blockers which are specifically related to Npgsql (as opposed to PostgreSQL).
Thanks for the additional detail. HasGeneratedTsVectorColumn is very simple sugar which creates a generated column with a very specific and simple SQL expression - it definitely does not recognize arrays or generate array_to_tsvector or jsonb_to_tsvector. I'll take a look at adding this.
However, you can simply set up the generated column yourself, providing whatever SQL you want - see the EF docs for more information (again, HasGeneratedTsVectorColumn basically does this exact thing under the hood).
Finally, the stack trace you posted above doesn't seem related to any of this - that looks like a report about a malformed connection string. Check exactly what you're using and make sure it's a valid connection string, if you can't figure it out post it here and I'll try to help.
If I can find a SQL query for the same would be great as I will use the raw SQL with the migration,
No need for raw SQL in migrations - just use HasComputedColumnSql as per the EF docs.
As for the actual SQL to use - I don't have any specific experience in full-text search over arrays/json... Try getting the SQL to work based on the PostgreSQL docs, and if you do please post back here.
changed the title [-]Documentation or sample on stored tsvector for arrays and jsonb type columns[/-][+]Support for array and jsonb for HasComputedColumnSql[/+]on Jan 13, 2022
changed the title [-]Support for array and jsonb for HasComputedColumnSql[/-][+]Support for array and jsonb for HasGeneratedTsVectorColumn[/+]on Jan 16, 2022
Activity
roji commentedon Jan 12, 2022
@toklive I'm not sure how tsvector would be compatible with arrays specifically... In any case, I'd recommend looking at general PostgreSQL documentation - if you can define a generated tsvector column over array/jsonb, you should be able to follow the Npgsql instructions as they are.
Let me know if you run into any blockers which are specifically related to Npgsql (as opposed to PostgreSQL).
roji commentedon Jan 13, 2022
Thanks for the additional detail. HasGeneratedTsVectorColumn is very simple sugar which creates a generated column with a very specific and simple SQL expression - it definitely does not recognize arrays or generate array_to_tsvector or jsonb_to_tsvector. I'll take a look at adding this.
However, you can simply set up the generated column yourself, providing whatever SQL you want - see the EF docs for more information (again, HasGeneratedTsVectorColumn basically does this exact thing under the hood).
Finally, the stack trace you posted above doesn't seem related to any of this - that looks like a report about a malformed connection string. Check exactly what you're using and make sure it's a valid connection string, if you can't figure it out post it here and I'll try to help.
roji commentedon Jan 13, 2022
No need for raw SQL in migrations - just use HasComputedColumnSql as per the EF docs.
As for the actual SQL to use - I don't have any specific experience in full-text search over arrays/json... Try getting the SQL to work based on the PostgreSQL docs, and if you do please post back here.
[-]Documentation or sample on stored tsvector for arrays and jsonb type columns[/-][+]Support for array and jsonb for HasComputedColumnSql[/+]roji commentedon Jan 13, 2022
That exception still seems partial - the actual message isn't in there.
[-]Support for array and jsonb for HasComputedColumnSql[/-][+]Support for array and jsonb for HasGeneratedTsVectorColumn[/+][-]Support for array and jsonb for HasGeneratedTsVectorColumn[/-][+]Support jsonb for HasGeneratedTsVectorColumn[/+]Support JSON columns in full-text search generated columns
Support JSON columns in full-text search generated columns
Support JSON columns in full-text search generated columns
Support JSON columns in full-text search generated columns (#2224)