create table p_words (
   recid int8 not null,
   f_words text,
   e_words_1 text,
   e_words_2 text,
   e_words_3 text,
   e_words_4 text,
   e_words_5 text,
   primary key (recid)
);

alter table p_words
   add column if not exists tsvector__f_words tsvector
   generated always as (udf.words_to_tsvector(f_words, true)) stored;

alter table p_words
   add column if not exists tsvector__e_words tsvector
   generated always as (udf.words_to_tsvector(coalesce(e_words_1, '') || ' ' || 
                                              coalesce(e_words_2, '') || ' ' || 
                                              coalesce(e_words_3, '') || ' ' || 
                                              coalesce(e_words_4, '') || ' ' || 
                                              coalesce(e_words_5, ''), true)) stored;

create index if not exists idx_tsvector__p_words__f_words on p_words using gin (tsvector__f_words);

create index if not exists idx_tsvector__p_words__e_words on p_words using gin (tsvector__e_words);