Thanks, Gary. I tried that, but I feel like there ...
# help
a
Thanks, Gary. I tried that, but I feel like there must be something different in the Supabase procedure editor that is causing all sorts of errors. Like maybe it doesn't want to see the "CREATE OR UPDATE..." line. I don't know. This is why I'm hoping to see something that a Supabase user knows works.
g
I just use the SQL editor directly in the UI. I had some issues with the function editor 2 months ago and replacing functions, so just gave up and wrote the SQL...
Something like (just a function example) : create or replace function public.my_rooms() returns varchar[] as $$ declare rooms varchar[]; begin rooms := ARRAY( SELECT room_key FROM room_joins WHERE auth.uid() = uid ); return rooms; end; $$ language plpgsql security definer;