RPC function not returning all data in Javascript app? #26686
-
Beta Was this translation helpful? Give feedback.
Answered by
silentworks
May 22, 2024
Replies: 2 comments
-
Do you have RLS enabled for all the tables for the user to access? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
old-rob
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't see some of your SQL here but the table you are getting the categories from is likely to have row level security (RLS) turned on and you are trying to make a request to that table without sufficient permission. A easy way to test this is inside of your SQL editor click on
role postgres
and change toauthenticated
and then select a user you want to run this query. Also try anon role too and see if the results match your.rpc
function call.