what thread?
# sql
u
what thread?
g
https://discord.com/channels/839993398554656828/931707371464556544'
Basically you have to return a table and can't use setof if you add any column to an existing table records (for example from a join).
u
so I'd have to remove setof?
g
You have to create a return table description and specify all the columns from main table and join tables you want returned. But I'm not much help as clear in that thread it was a learning experience. You would have to use the sql editor though not the function ui.
j
Yep, the supabase UI for creating functions is very limited. You can look at my post directly above yours for an example of how to return a table from a function. Basically you need to know the EXACT return type of every column. Also don't expect to be able to edit your custom functions through the UI