Can't get multiple records from a supabase function #16915
Replies: 4 comments
-
@RobertBrunhage the current function UI doesn't support returning a record set. You need to use SQL editor to create the function cos you have to define the returning record definition. https://www.postgresql.org/docs/9.1/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-TABLE |
Beta Was this translation helpful? Give feedback.
-
Also the UI in the /database/functions list doesn't indicate SETOF for the return value when already set |
Beta Was this translation helpful? Give feedback.
-
Bumping this issue since I think this would be a great addition for a lot of devs :) |
Beta Was this translation helpful? Give feedback.
-
Hiii :)
|
Beta Was this translation helpful? Give feedback.
-
Discussed in #4245
Originally posted by RobertBrunhage December 2, 2021
I have the following function that returns a
record
but this only seems to return the first record, instead of all of them.I've tried the same query in the SQL editor/tester and during that it returns multiple records.
How do I make the function return all the records that satisfy the query?
Beta Was this translation helpful? Give feedback.
All reactions