Should I store empty tsvector values ​​or NULL values?

When storing the tsvector value in a column for records without search conditions, should you keep the tsvector empty or NULL ?

Does it matter?

Is there a difference in performance or storage overhead from storing empty vectors?

In other words, when updating a vector based on a value, for example, a column with a title column of zero, I need to always calculate this as to_tsvector(coalesce(title,'')) (since to_tsvector returns NULL when set to NULL ) or enough to do to_tsvector(title) ?

+5
source share

Source: https://habr.com/ru/post/1263674/


All Articles