Open qwesda opened 8 years ago
Is there any way I can convince you to consider this for the "near future"?
Having the ability to do spreadsheet like copy/paste-operations (like in numbers) would be a great boost in productivity for me - probably as big as column-mode in a text editor.
There are just too many time where I have to get data from one or two columns from a few row, that are already visible. The quickest solution is usually to copy/paste the rows into a text editor or spreadsheet. Writing a query for these things would take longer and would have a significantly higher cognitive load than a quick "copy/paste to temp file -> remove unnecessary columns -> copy/paste to where I need the data".
Can confirm, this is holding back our team of ~20 from switching over from DataGrip. We are still using Postico trial for editing LTREE columns though, which DG doesn't support.
@jakob this is a must-have for any spreadsheet-like tool including a GUI client for databases. I'm very much shocked that something that I was very used to in many other DB clients is totally missing in Postico, and after 6.5 years of being asked, it's still not implemented.
You already offer "Copy Rows" and "Copy Cell", why not offer "Copy Columns" as well? Please, why not?
PS: Funny that even hiding columns doesn't work to copy just the visible columns when I copy row. It still copies all the columns. Otherwise I'd have asked for an eye icon on the right sidebar to hide columns more quickly, but now that looks like a moot point.
The reason why Postico doesn't have cell selection is because NSTableView doesn't support it. It is of course possible to implement it anyway, but it's a lot of effort.
The part about copying hidden columns is a bug, I'll have a look at that.
While I do think the previous comment was a bit on the harsh side, I still think this would be an amazing feature for Postico.
I try to encourage non-programmers to user interact with databases and Postico is hands down the most approachable DB-client out there. The ability to select rectangular cell-regions, copy them, past over them and clear them would be intuitively familiar to many users and would enable users who can't or are not comfortable writing queries. (And it would be a big timesaver for those who can ...)
@qwesda apologies for the harshness. I felt 6.5 years is too long for a basic feature, even if it has to be done with an ugly workaround. It's also a closed-source product with a paid licensing model.
Anyway @jakob I'm not a Swift programmer by profession, but I took a look at the API doc here: https://developer.apple.com/documentation/appkit/nstableview
I'm guessing maybe one or two of these could be helpful, yes?
And on reading this: https://stackoverflow.com/a/35991101/1134080
I'm guessing you have to implement your own copy:
method on the table and manually pump the data onto NSPasteboard
. If that's the case, maybe you can have an in-between UI to select the columns we wish to copy when we copy rows (with a Select/Deselect All). The UI could be defaulted on or off in the Settings as a user preference, and it could be alternated with current behavior by holding Option while clicking Copy Rows. This will actually give us more control than just selecting a block of cells.
The part about copying hidden columns is a bug, I'll have a look at that.
Thanks. I've created #831 to help you track it.
If that's fixed, maybe you can also consider adding checkboxes or "eye icon" on the right side panel next to the column names so that I can quickly hide and show columns, with a "Show/Hide All Columns" option on the top to toggle all of them. Because that could be another workaround for copying columns: just hide all columns, then show the columns you need, and copy the rows.
It might be cleaner than adding an in-between UI and gels better with the existing UI.
I would also love this feature because I frequently need to grab the id
column from one table in order to filter another table by the foreign key references in the list of IDs that would be produced.
Postico already handles pasting comma-separated identifiers elegantly to filter with lists. It would be nice not to have to hide all other columns to copy all the row values for a given column. To me a modifier key and right-click option to copy only the values for the column currently being hovered on would make a lot of sense there.
Option
+ Command
+ C
doesn't currently have an assignment but of course finding a safe copy shortcut is a bit harder.
Possibly the contextual menu could preview the name of the currently hovered column to prevent having to use an intermediary column selection screen as @ADTC suggested.
@olivierlacan I added a command to copy all values in a column in Postico 2.1. You have to click the column header, to get the correct menu.
I guess I should add the command to this menu as well.
@jakob Fantastic news! Thanks so much for adding that. I’ve been loving 2.x so far. 😊
I might sound greedy with this request, but as a nice follow-up to this feature it would be excellent to be able to paste column values the same way you can now copy them. For example if you're trying to copy the values from a given column to another column on the same table, or a different table with the same number of rows. 😇
It would be great if there would be a mode where one could select column/cell wise.