fix: regression that makes fts not work on domain types based on tsvector
This commit is contained in:
Vendored
+4
-3
@@ -957,15 +957,16 @@ INSERT INTO tsearch_to_tsvector(text_search) VALUES ('C''est un peu amusant de f
|
||||
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);
|
||||
|
||||
UPDATE tsearch_to_tsvector SET text_search_domain = to_tsvector('simple', text_search);
|
||||
UPDATE tsearch_to_tsvector SET text_search_rec_domain = to_tsvector('simple', text_search);
|
||||
|
||||
TRUNCATE TABLE artists CASCADE;
|
||||
INSERT INTO artists
|
||||
VALUES (1, 'duster'), (2, 'black country, new road'), (3, 'bjork');
|
||||
|
||||
TRUNCATE TABLE albums CASCADE;
|
||||
INSERT INTO albums
|
||||
INSERT INTO albums
|
||||
VALUES (1, 'stratosphere', 1),
|
||||
(2, 'ants from up above',2),
|
||||
(2, 'ants from up above',2),
|
||||
(3, 'vespertine',3),
|
||||
(4, 'contemporary movement', 1);
|
||||
|
||||
Vendored
+9
-1
@@ -3757,9 +3757,17 @@ create table "Surr_Gen_Default_Upsert" (
|
||||
extra text
|
||||
);
|
||||
|
||||
create domain tsvector_not_null as tsvector
|
||||
constraint "tsvector is required" check (value is not null);
|
||||
|
||||
create domain tsvector_not_empty as tsvector_not_null
|
||||
constraint "tsvector is required and not empty" check (value <> '');
|
||||
|
||||
create table tsearch_to_tsvector (
|
||||
text_search text,
|
||||
jsonb_search jsonb
|
||||
jsonb_search jsonb,
|
||||
text_search_domain tsvector_not_null default '',
|
||||
text_search_rec_domain tsvector_not_empty default '.'
|
||||
);
|
||||
|
||||
create function test.get_tsearch_to_tsvector() returns setof test.tsearch_to_tsvector AS $$
|
||||
|
||||
Reference in New Issue
Block a user