3

I've been trying to add stored generated column with this command

ALTER TABLE mtn_order
ADD COLUMN textsearchable_index_col tsvector
GENERATED ALWAYS AS (to_tsvector('english', coalesce(descr, '') || ' ' || coalesce(descrrep, ''))) STORED;

But I get error:

ERROR:  syntax error at or near "("
LINE 3: GENERATED ALWAYS AS (to_tsvector('english', coalesce(descr, ...
                            ^

What am i doing wrong?

UPDATE: Had to upgrade to version 12

Viktor
  • 325
  • 2
  • 10

0 Answers0