ja, ein
funktioniert.Code:UPDATE search_book sb SET textsearchable_index_gin = setweight(to_tsvector(e.title_lang, coalesce(e.title,'')), 'A') || setweight(to_tsvector('simple', coalesce(an.authornames,'')), 'B') || setweight(to_tsvector('simple', coalesce(e.isbn10,'')), 'C') || setweight(to_tsvector('simple', coalesce(e.isbn13,'')), 'D') FROM editions e inner join book_author ba using (bookid) inner join ( select array_to_string(array_unique(array_agg(name)),' ') as authornames, authorid from authornames where authorid = 1 group by authorid ) as an using (authorid) WHERE an.authorid = 1 and sb.editionid = e.editionid;



1Likes
LinkBack URL
About LinkBacks

Zitieren
Lesezeichen