Skip to content

Commit 9020a54

Browse files
fix(db): qualify cross-function calls in search migration (#66)
Both page_search_vector and search_pages call extract_text_from_lexical without schema qualification. With set search_path = '' (empty), PostgreSQL cannot resolve the function, causing every Deploy Migrations run to fail since PR #53 was merged. Prefix calls with public. so they resolve under an empty search path. Co-authored-by: Ona <no-reply@ona.com>
1 parent dca95b2 commit 9020a54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

supabase/migrations/20260415111351_add_page_search_vector.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ as $$
6060
begin
6161
return (
6262
setweight(to_tsvector('english', coalesce(title, '')), 'A') ||
63-
setweight(to_tsvector('english', coalesce(extract_text_from_lexical(content), '')), 'B')
63+
setweight(to_tsvector('english', coalesce(public.extract_text_from_lexical(content), '')), 'B')
6464
);
6565
end;
6666
$$;
@@ -132,7 +132,7 @@ begin
132132
p.icon,
133133
ts_headline(
134134
'english',
135-
coalesce(p.title, '') || ' ' || coalesce(extract_text_from_lexical(p.content), ''),
135+
coalesce(p.title, '') || ' ' || coalesce(public.extract_text_from_lexical(p.content), ''),
136136
tsquery_val,
137137
'StartSel=<<, StopSel=>>, MaxWords=35, MinWords=15, MaxFragments=1'
138138
) as snippet,

0 commit comments

Comments
 (0)