SequelPG v0.3.8: a Connections menu, editing the live connection, and safer sidebar drops
v0.3.6 made SequelPG look and behave like a Mac app: window tabs, a real menu bar, a toolbar that switches modes. What it didn’t do was make connections easy to find once you were past the start page. To open a second saved database you had to know that ⌘T opens a fresh start page in a new tab; to fix a typo in the host you had to disconnect first. v0.3.8 puts both one click away. It ships together with v0.3.7, released a few minutes earlier, which fixes how the sidebar drops operators, aggregates and overloaded functions — and how the array editor saves text with line breaks in it.
A Connections menu in the toolbar
Next to the connection name in the toolbar there is now a Connections menu. It lists everything you need without leaving the window you’re in:
- Edit Connection… for the connection this window is using
- Disconnect
- Your saved connections — pick one and it opens in a new tab, already connected
- New Connection Tab, for a fresh start page
The start page also gained a hint that ⌘T opens another connection in a new tab, so the shortcut is discoverable on the first day rather than the tenth.
Edit the connection you’re connected to
Edit Connection… (in the File menu and the Connections menu) opens a sheet with the same form you use on the start page — host, port, database, user, SSL mode, SSH tunnel — for the live connection. It ends with two buttons:
- Save stores the change and leaves your current session running. Use it for a rename or a setting you only need next time.
- Save & Reconnect stores the change and reconnects straight away, so a corrected host or a new SSL mode takes effect now.
Both screens now share one connection form, so the start page and the sheet can’t drift apart. If the saved connection has been removed, the sheet says so: “This connection was removed from the saved connections.” The menu item is disabled when the window has no connection.
A clearer File menu
The File menu now names what each item actually opens:
- New Connection Window (
⌘N) - New Connection Tab (
⌘T) - Open Connection in New Tab — a submenu of your saved connections that connects immediately
- Edit Connection…
No shortcuts changed: ⌘N and ⌘T do what they did in v0.3.6, the menu just says so now.
v0.3.7: dropping exactly the object you clicked
The sidebar’s Drop command had three ways to go wrong, all rooted in the same thing: it turned a sidebar entry into a name, and then asked PostgreSQL to find that name again.
- Operators were listed by bare symbol. But
DROP OPERATORneeds the argument types —DROP OPERATOR ===(integer, integer)— so every operator drop failed. - Overloads of a function or aggregate share a name, so the target was ambiguous, and argument types with unusual names could break the signature.
search_pathdecides which schema an unqualified type name resolves to. Two types with the same name in different schemas makef(mytype)mean different functions depending on the session — including after aSET search_pathyou ran in a query tab.
v0.3.7 changes how objects are identified in the first place. Operators are listed with their argument types, so each overload is its own entry. Function and operator signatures always schema-qualify non-built-in types — f(public.mytype) — so overloads that differ only by a type’s schema stay distinct.
Then every drop runs inside one pinned catalog transaction. It first checks current_database() against the database shown in the sidebar, so a drop can’t land in another database if you switched mid-way. The DROP target is rendered server-side from the catalog, matching the schema-qualified signature and the object kind. If the object no longer exists, or the signature matches more than one object, the drop is refused rather than guessed. The confirmation now also warns that dependent objects are dropped too.
The same resolution fixes the read side: the Definition tab and the Run sheet now open the overload you selected, whatever the session’s search_path is.
v0.3.7: array elements that round-trip
PostgreSQL’s array literal format quotes elements and escapes special characters with backslashes. The array editor got three parts of that wrong:
- An element containing a newline was saved as a literal
n; tabs and carriage returns had the same problem. - A quoted string
"NULL"came back as a realNULL. - Quoted elements lost their leading and trailing spaces.
Elements now round-trip exactly, including \v and \f, and the array editor shows and edits multi-line elements directly.
Concretely, v0.3.7 and v0.3.8 mean
- A Connections toolbar menu: Edit Connection, Disconnect, open any saved connection in a new tab, New Connection Tab
- Edit Connection… for the live connection, with Save or Save & Reconnect
- File menu: New Connection Window (
⌘N), New Connection Tab (⌘T), and Open Connection in New Tab - Sidebar Drop works for operators, aggregates and overloaded functions, refuses ambiguous or vanished targets, checks the current database, and ignores
search_path - Operators listed with their argument types; Definition tab and Run sheet open the overload you selected
- Array elements with newlines, tabs, spaces, or the text
NULLsave and load exactly as typed - A new test suite for the drop logic
Grab v0.3.8 from the latest release or build from source with Xcode. Connect to something, open the Connections menu, and your other databases are one click away.