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:
Vendored
+9
@@ -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);
|
||||
|
||||
Vendored
+13
@@ -3799,3 +3799,16 @@ create table surr_gen_default_upsert (
|
||||
name text,
|
||||
extra text
|
||||
);
|
||||
|
||||
create table tsearch_to_tsvector (
|
||||
text_search text,
|
||||
jsonb_search jsonb
|
||||
);
|
||||
|
||||
create function test.get_tsearch_to_tsvector() returns setof test.tsearch_to_tsvector AS $$
|
||||
select * from test.tsearch_to_tsvector;
|
||||
$$ language sql;
|
||||
|
||||
create function test.text_search_vector(test.tsearch_to_tsvector) returns tsvector AS $$
|
||||
select to_tsvector('simple', $1.text_search)
|
||||
$$ language sql;
|
||||
|
||||
Reference in New Issue
Block a user