Unable to get data using rpc in JS library, but able to in sql editor
I'm looking to use postgis to store a simple table with a name and point value.
Should I add the postgis extension onto the public table?
I've seen tutorials where people create a gis schema and the location table lives there.
But when I've tried to use the js client library.
like
I get zero results, even though it works when I run the method
This is what the function looks like in the gis schema
running
in the sql editor on supabase returns a result.
3 Replies
Almost always RLS if you don't get an error.
Try impersonation in the SQL editor (bottom right) and see what happens.
My other question was about DB design, where should a location table exist? Should it be in a separate schema than public? Is there a rule people should follow?
Totally up to you. RLS protects and depends on if you have data that is similar to all your other public tables.
I only use custom schemas for data needing extra security by removing grants to the schema.