SETOF function
#13227
|
Using interface of Supabase "/database/functions" we can an option to create a function. I would create of function which return several row. As I understand it is SETOF function type. How to write definition of a function to get such type of results? For instance, I have a function definition. I would like to get several rows. What I need to add into this definition to achieve desired result? |
Answered by
rustkas
Mar 27, 2023
Replies: 1 comment
|
I far as I understand Supabase does not support returning a SETOF record directly from a PostgreSQL function. Instead, we can modify the function to return a table, which can be queried using Supabase. We need to run this code in "SQL Editor". This code create function which return table record as set of selected data. This is working solution. |
0 replies
Answer selected by
rustkas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I far as I understand Supabase does not support returning a SETOF record directly from a PostgreSQL function. Instead, we can modify the function to return a table, which can be queried using Supabase.