Postico icon indicating copy to clipboard operation
Postico copied to clipboard

Feature request: export psql-like pretty text (including query) that I can paste into Slack/email/etc

Open daterdots opened this issue 3 years ago • 4 comments

I end up taking a LOT of screenshots of Postico and pasting them into Slack. Usually the conversation goes: "something doesn't look right in the database. Look at the weirdness this query returns." Then I paste in a screenshot of the query editor and response from Postico. That's a pain because someone can't easily copy-paste my query, and the results are also not searchable.

On some occasions, I have tried to "roll my own" version of this feature request by copy-pasting the query out of the query editor as text then also "Copy Special > Copy with header" from the response. This works ok, and at least all of the text is there in a searchable way, but the formatting looks very ugly.

Bad copy paste of image, but what I usually do:

image

Better, but cumbersome and still doesn't look very nice:

SELECT 'postico should copy/paste like psql' AS my_request,
       'wow great feature request idea' AS postico_response;

my_request	postico_response
postico should copy/paste like psql	wow great feature request idea

image

What I am requesting

I can "Copy Special > Pretty Text" and get something like this on my clipboard that I can paste into Slack or email

SELECT 'postico should copy/paste like psql' AS my_request,
       'wow great feature request idea' AS postico_response;

             My Request              |         Postico Response     
-------------------------------------+---------------------------------
 postico should copy/paste like psql | wow great feature request idea
(1 row)

daterdots avatar Apr 10 '21 00:04 daterdots

Does Slack support markdown? Because there's this related feature request: "Copy as Markdown" #597

For example, Github renders the following code

id | name 
---|-------
1  | Jakob
2  | Bastian

like this:

id name
1 Jakob
2 Bastian

jakob avatar Apr 10 '21 07:04 jakob

Unfortunately, Slack uses a flavor of markdown called mrkdown which does not support tables.

daterdots avatar Apr 10 '21 15:04 daterdots

One other more subtle point is that it would be great to be able to copy the response AND the query in one action!

daterdots avatar Apr 10 '21 16:04 daterdots

I think Postico would come close to this use case if it supported an aligned Markdown export format (perhaps even as the default export format for Markdown tables). Currently, the sample table above exports this Markdown text:

| id |name |
| --- | --- |
| 1 |Jakob |
| 2 |Bastian |

It would be much more useful for chat and notes if it exported this:

| id  | name    |
| --- | ------- |
| 1   | Jakob   |
| 2   | Bastian |

alexthehurst avatar May 12 '22 06:05 alexthehurst