pgadmin-org / pgadmin-org/pgadmin4

Define a function with a `setof` return type

Open
#9,264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

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.

Image

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing Custom return type? toggle and return-type dropdown in the function-definition UI. Confirm how the selected type is represented for set-returning functions, then verify that enabling Returns a set? produces a setof return type while preserving dropdown selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.