pgadmin4
pgadmin4 copied to clipboard
Define a function with a `setof` return type
Describe the solution you'd like
A simple way to define a function that returns setof something for set returning functions. Perhaps a toggle called Returns a set? that when activated will define the specified Return type as setof.
Describe alternatives you've considered
Just clicking the Custom return type? toggle, and typing in setof <my type>. This works, but I don't get to use the dropdown list that has my type.
Additional context
Here is a proposed screen snip of how this could look, with a Returns a set? toggle under the Custom return type? toggle.
Thanks!
Hey y'all,
So, funny enough, turns out the exact thing I was looking for (with exactly the same wording) existed this whole time, just on the "Options" tab when making a function;
Wondering if it makes sense to move it to the "Definition" tab, as that is where you are specifying the return type?
Either way, I got what I need now, just took me poking around more to see a feature that might have been there for a long time.
Thanks!
Moving Returns a set? to to definition along with other return stuff makes more sense.