feat: apply to_tsvector() explicitly to the full-text search filtered column, only if it's not of tsvector type

This commit is contained in:
Laurence Isla
2025-01-28 19:14:54 -05:00
parent e7cc8fedc0
commit b7d0a1f68c
12 changed files with 422 additions and 126 deletions
+9
View File
@@ -930,3 +930,12 @@ INSERT INTO surr_serial_upsert(name, extra) VALUES ('value', 'existing value');
TRUNCATE TABLE surr_gen_default_upsert CASCADE;
INSERT INTO surr_gen_default_upsert(name, extra) VALUES ('value', 'existing value');
TRUNCATE TABLE tsearch_to_tsvector CASCADE;
INSERT INTO tsearch_to_tsvector(text_search) VALUES ('It''s kind of fun to do the impossible');
INSERT INTO tsearch_to_tsvector(text_search) VALUES ('But also fun to do what is possible');
INSERT INTO tsearch_to_tsvector(text_search) VALUES ('Fat cats ate rats');
INSERT INTO tsearch_to_tsvector(text_search) VALUES ('C''est un peu amusant de faire l''impossible');
INSERT INTO tsearch_to_tsvector(text_search) VALUES ('Es ist eine Art Spaß, das Unmögliche zu machen');
UPDATE tsearch_to_tsvector SET jsonb_search = jsonb_build_object('text_search', text_search);