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

Paste URI into Postico #510

Closed
swrobel opened this Issue Mar 6, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@swrobel

swrobel commented Mar 6, 2018

Request: Add the ability to Import or Paste into the favorites window from a connection string.

What did you do?

Typed open postgres://... into a Terminal (actual connection string removed)

What did you expect to happen?

Postico opens and adds the connection

What actually happened?

TablePlus (recently installed) stole the postgres:// handler and opened instead

What software versions are you using?

Postico version: 1.3.2

macOS version: 10.13.3

PostgreSQL version: 10.3

@jakob

This comment has been minimized.

Owner

jakob commented Mar 6, 2018

The obviously correct solution is to immediately uninstall TablePlus.

Joking aside, there are a few ways to create a favorite from an URL:

  1. Click "New Favorite" -- if a postgres:// URL is in the clipboard, the fields will be filled correctly automatically
  2. You can paste an URL into the "host" field and Postico should do the right thing (feature was added in a recent version)
  3. And finally, you can also use open -a Postico postgres://...

It seems that's not intuitive enough. What did you try to do? Just press Cmd-V when the favorites window is active? I'll see if we can support that...

@swrobel

This comment has been minimized.

swrobel commented Mar 6, 2018

I just discovered solution 3, which works for now. I had the URL on my clipboard and hit New Favorite, and it didn't pre-fill (I think it didn't work because copying URIs from a browser sometimes ends up with a linebreak included in the clipboard data after the connection string). I had tried pasting into the Nickname field, but I guess Host would've made more sense. I did indeed first try Cmd+V with the favorites window active.

Also worth noting I am not a fan of TablePlus. It reminds me of every other DB interface out there: cluttered & confusing. Appreciate your attn to detail.

@postico-bot

This comment has been minimized.

postico-bot commented Mar 8, 2018

We have been working on this issue!

jakob: URL handling improvements #510

Download Build B2459, or check out the list of recent builds.

@jakob

This comment has been minimized.

Owner

jakob commented Mar 8, 2018

@swrobel here's the changelist for build B2459:

We've made some improvements with regard to connection URL (like postgres://example.com)

  • You can now paste URLs into the favorites window #510
  • Postico now ignores whitespace when parsing URLs #510
  • It's no longer required to include user name & database name when opening URLs if you already have a matching favorite.
  • You can use the scheme postico instead of postgresql if you want to open Postico specifically, eg. open postico://example.com

I think this should fix all the things. I also did some refactoring (got rid of some workarounds in 10.8 and 10.9 bugs that are no longer necessary since we require 10.10 now). I hope I didn't break anything.

@swrobel

This comment has been minimized.

swrobel commented Mar 9, 2018

Everything works perfectly using that build! Thanks for the quick turnaround!

@swrobel swrobel closed this Mar 9, 2018

@swrobel

This comment has been minimized.

swrobel commented Mar 9, 2018

While I've got your ear, any hope for a fix for #468 soon?

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