Why does my RPC function keep breaking?
I know the code works correctly. It works fine right after I push a new build, but over time, for some reason the RPC function just returns an empty dataset. Is there some kind of caching thing going on with supabase or something with these RPC functions?
10 Replies
Not enough info.
There is no caching in Supabase.
Next.js does do caching.
Could it be RLS?
no because it worked fine and works fine right after a rebuild
What does rebuild mean?
ive tried re-adding the function as well and still same issue
sorry - re-deploying my app
Try calling it from the SQL editor and use impersonation.
Maybe you are losing your user session at some point?
Without code and knowing if RLS would impact hard to know. You don't say you are getting an error, so that would be RLS or logic error in your function.
Without code and knowing if RLS would impact hard to know. You don't say you are getting an error, so that would be RLS or logic error in your function.
tysm will try that rn
@garyaustin is there a way to do this without the RPC function? https://supabase.com/docs/guides/functions/examples/semantic-search
Semantic Search | Supabase Docs
Semantic Search with pgvector and Supabase Edge Functions
i cant figure out what it is. it works and then it doesnt work. it makes no sense
wasnt like this before. only started doing this like a month or so ago
You did not say you were getting an error just empty dataset.