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

Add support for editing functions (stored procedures) #72

Closed
jakob opened this issue Sep 21, 2015 · 86 comments
Closed

Add support for editing functions (stored procedures) #72

jakob opened this issue Sep 21, 2015 · 86 comments

Comments

@jakob
Copy link
Owner

jakob commented Sep 21, 2015

Multiple users have requested a way to edit stored procedures/functions in Postico.

I'm not currently working on this feature, but I do plan to add it at some point in the future.

Please click the thumbs up button if this would be useful for you!

@qwesda
Copy link

qwesda commented Sep 22, 2015

While it's definitely a feature I would like to have it also seems like a lot of work.
Sequences, indices, extensions and custom data types are probably easier to add.

@trapias
Copy link

trapias commented Sep 22, 2015

Would be great

@JonasClark
Copy link

Definitely! I'm having trouble editing a function right now and would love to have the ability to view and edit it easily.

@patriksimek
Copy link

+1

2 similar comments
@radim
Copy link

radim commented Oct 1, 2015

+1

@tills13
Copy link

tills13 commented Nov 10, 2015

+1

@miverson
Copy link

Yes, please. You seem to have a vert nice tool, that only solves half of the problem.

@rns4731
Copy link

rns4731 commented Nov 27, 2015

+1 Great tool but to use it seriously, we need stored procedures.

@jcalabro
Copy link

jcalabro commented Dec 3, 2015

Yes please, this is very important!

@jamesdixon
Copy link

Very important! I love the application, but this would be the one thing holding me back from purchasing the full version. Premium feature?

@topherlandry
Copy link

Please do. Just purchased this and was surprised to find that editing functions wasn't already available.

@trapias
Copy link

trapias commented Dec 9, 2015

What would it mean to have editing features for functions?
A minimal yet useful improvement would be, IMHO, to see functions listed in left tree, just like tables.

Once selected a function on tree, its details would be displayed with a tabbed interface similar to the one now available for tables:

  • the "structure" tab would become an SQL editor with the function create script in it,
  • the "content" tab could allow to execute function setting params via a dedicated UI component, and displaying results like in query editor.

What else?

@topherlandry
Copy link

Honestly, that would be all I need. The interface for functions in the competing product is overkill for me and really slows down my workflow.

Most of the time when editing a function, I just need minor changes which are quick and easy with a simple editor.

@jamesdixon
Copy link

@trapias what you've described would be plenty for my needs -- I agree with @topherlandry. I think it's more about quick access/editing/execution than anything else -- nothing fancy.

@trapias
Copy link

trapias commented Dec 10, 2015

I also think we could go with a minimal, efficient way to handle this.

Don't know how you do it, but I normally have pgAdmin open together with Postico: I use the former to find the function I need to work on, copy its content and paste it into Postico to work on it.

Just having the possibility to see functions and click on them to get them pasted in query editor would be a time-saver.
I'd say we could slightly change the navigation sidebar, just:

  • put all tables under a "tables" node in tree
  • add a new "functions" node, and list functions under it
  • click on a function to open it in query editor
  • optionally right-click for a context menu with actions like "drop", "create new", "edit"
  • let the filter ("Search") box in navigation bar filter also the list of functions

I believe these, maybe together with a "search-and-replace" capability in query editor, would be huge enhancements for who, like me, @topherlandry and @jamesdixon at least, need to work on functions/stored procedures.

Well not exactly ten minutes work for @jakob, but not even days I think. Could also be a feature reserved for licensed users (I happily am one), but would love to have this.
Don't you?

@jakob
Copy link
Owner Author

jakob commented Dec 10, 2015

Thanks for all your input! I only occasionally use functions myself, so I have to completely rely on your input for this, and it's great to hear so many suggestions.

If I understand correctly, the most important first step would be a read-only way to simply view a list of functions and their code. It should be possible to implement something like that quickly.

@trapias your list of suggestions is great, I'll try doing that. Instead of mixing functions and tables in the sidebar like pgAdmin does, I'd like to try something similar to Xcode. Xcode has a sidebar, and there are icons at the top of the sidebar (see screenshot) that let you switch between viewing files, issues, etc. In Postico there could be an icon for tables and an icon for functions, so you could switch between showing tables or functions in the sidebar.

xcode sidebar

Does anybody have a good idea for an icon to represent a function?

@topherlandry I'm curious, what competing product are you talking about? :)

@topherlandry
Copy link

Referring to Navicat Essentials. Their interface is really heavy and cluttered for what I need, which is minimalistic.

I like the idea of icons at the top. You could use the mathematical symbol for function as an icon, which is a lower case, italicized, cursive f(x).

@qwesda
Copy link

qwesda commented Dec 10, 2015

I wanted to suggest the same tab-like bar for switching between data/functions/data types/etc. .
Most of the time one probably wants to use one or the other, so mixing them in the same tree has little advantage. It also stays out of the way of users who don't use functions at all.

As for an icon for functions 𝑓(x) should work well (MATHEMATICAL ITALIC SMALL F U+1D453)

@trapias
Copy link

trapias commented Dec 11, 2015

@jakob I like the idea of icons on top of the sidebar, cool 👍

@jcalabro
Copy link

That would be great! I think that is a very good solution. I like the idea for that icon.

@jamesdixon
Copy link

@jakob any update on whether this might make it into the next release?

Cheers.

@jakob
Copy link
Owner Author

jakob commented Feb 2, 2016

@jamesdixon I haven't started working on stored procedures yet. This feature is at least a couple of months away.

@miverson
Copy link

miverson commented Feb 9, 2016

I like the concept.

Perhaps a simple 'edit' feature would allow you to copy the read-only
function to the SQL query window, similar to the query history, to allow
editing there.

Just don't reproduce the pgadmin "feature" where you get a stale copy of
the function if you forget to refresh the list. I've been burnt by this
more times than I would like to admit.

On Tue, Feb 2, 2016 at 6:08 AM, Jakob Egger notifications@github.com
wrote:

@jamesdixon https://github.com/jamesdixon I haven't started working on
stored procedures yet. This feature is at least a couple of months away.


Reply to this email directly or view it on GitHub
#72 (comment).

Michael Iverson

@JAertgeerts
Copy link

+1: Would very much like to see this feature in asap. Currently lacking it as a premium user, was expecting it to be in already because it's that vital to serious use of postgres.

@dollarklavs
Copy link

+1 for this. Would very much love to leave pgAdmin behind, but it still has so many important features.

@jamesdixon
Copy link

@jakob any update on this?

Also, as a premium user, I'm curious as to the process you're using to prioritize features? For example, I saw that basic support for Cockroachdb is being added, but that seems very low priority given that it's a relatively unknown database in beta compared to a feature like this (or others) that are highly requested and fundamental to working with Postgres.

@jakob
Copy link
Owner Author

jakob commented May 30, 2016

@jamesdixon I try to prioritise features that lots of people want, obviously, because it is the right thing to do and also because that leads to more sales.

But just as important is the amount of time required to implement a feature. Adding support for CockroachDB was a couple of hours of work, and some parts (like the client side TLS certificate stuff) is also useful for PostgreSQL users.

Adding support for editing stored procedures will require some significant changes to the UI, specifically the sidebar. I've started this work, and but it will still take me time to complete. This is mostly UI work, which is the most time-consuming kind of work. While a simple logic change is often just a handful of lines that I need to add, a new view will require lots of design work and adding several new files. I rarely get it right on my first try, so I often start over or keep making changes to the UI until it works.

@bleonard33
Copy link

+1

1 similar comment
@dbogatov
Copy link

+1

@saurabhxkapoor
Copy link

@jakob - A lot of my colleagues want to move to Postico but they can't do because it doesn't support this feature. Pls consider this feature as a priority.

@qwesda
Copy link

qwesda commented Apr 6, 2018

@miverson: technically it should be impossible to write a worse UI than pgadmin4.

I also agree, that visibility + copy-paste-ready code would suffice for now - thats all I'm using pgadmin for, but this program makes it as hard as possible to achieve this ... and after I hit cmd+q, it crashes as a final middle finger to the user!

@9mm
Copy link

9mm commented Apr 6, 2018

Yes, I think if you threw modly bread and sticks at a piece of flypaper you would have a better UI than PGAdmin, yet thats what I'm also forced to use

@topherlandry
Copy link

I find it amazing that more than 2 years later the same people are asking for the same feature. I gave up on it ever coming -- which is a shame because I really liked Postico.

@jakob
Copy link
Owner Author

jakob commented Apr 10, 2018

Hi folks!

Instead of complaining about pgAdmin here, please consider reporting feedback to their mailing list. I'm sure Dave Page and the development team would love to hear what you are struggling with (if you tone down the sarcasm a bit...). They do listen to user feedback.

I'm sorry that development of Postico isn't as fast as you'd like. Fixing all the little bugs takes a lot of time, and we're a small team, so we can only do a few major features at a time.

I don't really have any updates on this issue. All I can say is that I consider functions an important feature that I really want to have. I don't know how long it'll take, and if you need this feature, you'll need to use a different client. I'd love for Postico to have a feature like this, but we're just not there yet.

@jamesdixon
Copy link

@jakob maybe it would help to share exactly what is coming next for Postico? I believe the issue here isn't a lack of respect for the development process, but instead an issue with communication.

I had previously suggested making some sort of public roadmap. Sure, maybe the features takes months to develop, but at least Postico users and prospective Postico users will have an idea of what to expect going forward.

@miverson
Copy link

miverson commented Apr 10, 2018 via email

@senjaz
Copy link

senjaz commented Nov 5, 2018

3 years and still waiting for this. Holder of multiple licenses for business and personal use.

@guoxiangyang
Copy link

I've move from Mac to Linux for 2 years and this function still not present...

@johnthuss
Copy link

Just having a list of the functions and the ability to see the 'CREATE OR REPLACE' code would be more than enough for me. Thanks! We just bought 10 licenses.

@jamesdixon
Copy link

@johnthuss agreed. That's all I'm looking for as well

@sanjaypojo
Copy link

Same here @jakob, have been using the paid version of Postico for years and the only feature I'm missing is a list of stored functions with their source code. It's an amazing app and this is literally the only missing feature. Happy to edit the functions manually in the query tab!

@tim-walton
Copy link

only reason i dont pay for this app is because its missing this feature.. even my ide has this feature..

@senjaz
Copy link

senjaz commented Mar 7, 2019

@tim-walton the app is worth paying for already. The way I look at it is that if we don’t vote with our wallet then developers tend to drift off on to other things.

@jamesdixon
Copy link

@senjaz while I agree with you, the developer has indicated in #608 that they are doing well with their license revenue. If that's the case, then they should be focused on features the community wants, i.e. function editing support, which has the most reactions by double of any other feature request. Instead, the developer has chosen to focus on things like dark mode and cockroach db support. It's frustrating when you've been waiting around for literally years for a feature that is so clearly valued by the community.

@bstro
Copy link

bstro commented Jul 5, 2019

+1 – doing work with postgraphile/postgrest and would really appreciate this feature. I might end up purchasing a license without it, but the lack of this feature is my only hesitation.

@fvvliet
Copy link

fvvliet commented Jul 22, 2019

Same same

@miverson
Copy link

Yes, It's been nearly 4 years since this was requested. I'm tired of opening pgadmin4 windows.

@jakob
Copy link
Owner Author

jakob commented Feb 4, 2020

Hi everyone!

Postico 2 will have support for editing stored procedures and functions. We can't say how long it'll take us to release Postico 2, but you can already download a beta version here: https://eggerapps.at/postico2/

The beta version of Postico 2 only has a read-only list of functions. I know that it's not a full editor, but it's better than not showing functions at all.

(I already announced the beta earlier, but not everyone commenting here might have seen the announcement in #689, so I'm posting again. Apologies for spamming those of you who already know.)

@doerwalter
Copy link

Great to hear that Postico 2 is coming. However I find the UI for functions/procedures strange: Instead of grouping functions and procedures with the tables and views in the same schema, they are grouped at the top level into a separate tab.

So if I'm working on closely related tables, views and procedures those objects are all in the same schema and share a name prefix (so the table might be called kunde, the view kunde_select_active and procedures might be called kunde_insert, kunde_update, kunde_delete, kunde_abrechnen etc.). If all objects would be available in one group for the schema, they would be located next to each other in an alphabetical list. But with the current UI I constanty have to switch to another tab, find the schema and the object within it. This is annoying.

@9mm
Copy link

9mm commented Feb 25, 2020

I don't know if this is a good spot to comment on Postico 2 as well, but the one thing keeping me from using it is it's no longer able to do an SQL query in one click. That's mostly the whole point of why I use Postico for many production servers.

Now, many clicks are involved and it just feels very clunky/clumsy to do a single query, and that it just saves every single one. I rarely am wanting to save what I'm doing. Maybe there can be a "Quick SQL" section above the one where it automatically stores it or something...

@jakob
Copy link
Owner Author

jakob commented Feb 26, 2020

@doerwalter Thanks for the feedback. I usually have separate databases for separate projects, and I assumed that's how most people use PostgreSQL. I see that the way the interface works now is annoying when you have multiple projects / customers in one database and use schemas for grouping stuff. I'll think about this, but what I really like about the current UI is that functions are somewhat hidden and don't confuse people who don't use them...

@9mm This thread is already very long, so I created a new issue for your feedback (#698)

@miverson
Copy link

miverson commented Feb 26, 2020 via email

@jakob
Copy link
Owner Author

jakob commented Sep 22, 2020

@martinjankoehler has been working on a graphical editor for stored procedures and functions, and we just merged it into the master build of Postico 2.

Please download the latest build of Postico 2 here: https://releases.postico.app

@qwesda
Copy link

qwesda commented Sep 22, 2020

Looks promising!

Should we already report issues or should we wait a for few builds?

@jakob
Copy link
Owner Author

jakob commented Sep 23, 2020

@qwesda Yes please report issues! (As new issues if possible, since this thread is already very long)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests