Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROCEDUREs aren't shown in the Functions view #27069

Open
2 tasks done
ChristianSi opened this issue Jun 6, 2024 · 0 comments
Open
2 tasks done

PROCEDUREs aren't shown in the Functions view #27069

ChristianSi opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement New feature or request frontend Related to supabase dashboard

Comments

@ChristianSi
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Occasionally it's necessary to create a PROCEDURE instead of a FUNCTION. Specifically, PROCEDUREs invoked with CALL can do their own transaction management, while FUNCTIONs cannot.

It's possible to create, replace, and drop PROCEDUREs using the SQL editor, but they don't show up in the Functions view, which makes accessing and editing them very difficult.

To Reproduce

  1. Use the SQL editor to create a PROCEDURE, for example:
CREATE OR REPLACE PROCEDURE public.myproc()
 LANGUAGE plpgsql
AS $procedure$
declare
begin
  -- do something here
end;$procedure$
;
  1. Open the Database / Functions view and select the specified schema (if necessary) to find it. It won't be there, and if search for it using the search box, it won't show up either.

Expected behavior

PROCEDUREs should be shown in the Functions view together with actual FUNCTIONs. There should be some symbol or similar that allows to distinguish which is which.

Alternatively, there could be a separate Database / Procedures view just for them.

Ideally it should also be possible to create them using the GUI. Either by adding to the "Add a new function" view a checkbox "Create as procedure" (or something similar). Or, if there is a new Database / Procedures view, by adding a "Add a new procedure" button there.

System information

All/latest.

@ChristianSi ChristianSi added the bug Something isn't working label Jun 6, 2024
@Hallidayo Hallidayo added frontend Related to supabase dashboard enhancement New feature or request and removed bug Something isn't working labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Related to supabase dashboard
Projects
Status: No status
Development

No branches or pull requests

2 participants