© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
5 replies
Eva

FTS Generated Column using data from multiple tables

The Supabase Docs have this handy guide to full text search. https://supabase.com/docs/guides/database/full-text-search#searchable-columns

It includes this example of creating a
generated
generated
column to use when searching:

alter table
  books
add column
  fts tsvector generated always as (to_tsvector('english', description || ' ' || title)) stored;

create index books_fts on books using gin (fts); -- generate the index

select id, fts
from books;
alter table
  books
add column
  fts tsvector generated always as (to_tsvector('english', description || ' ' || title)) stored;

create index books_fts on books using gin (fts); -- generate the index

select id, fts
from books;


How would you modify this example to fetch data from a table that isn't
books
books
? For example if
books
books
included
author_id
author_id
and you wanted to look up some columns from a separate
authors
authors
table.
Full Text Search | Supabase Docs
How to use full text search in PostgreSQL.
Full Text Search | Supabase Docs
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Creation of FTS column which combines data from two different tables inside VIEW
SupabaseSSupabase / help-and-questions
4y ago
Webhook data from multiple tables
SupabaseSSupabase / help-and-questions
3y ago
FTS makes relationship null
SupabaseSSupabase / help-and-questions
16mo ago
Failing to fetch data from tables in expo
SupabaseSSupabase / help-and-questions
4y ago