Postico
Postico copied to clipboard
New feature in Postico 2: Startup Queries
We've just added a new feature in Postico 2 Preview Build 6450: Startup Queries.
You can download the new build here: https://eggerapps.at/postico2/
Startup Queries allow you to execute SQL commands automatically after Postico establishes the connection. This is really useful for setting all kinds of connection parameters!
Here's an example what the feature looks like:

Popular examples
You can now set any configuration parameter that can be changed by your user! Here are some examples:
- time zone:
SET TIMEZONE = 'Europe/Vienna'; - search path:
SET search_path = public, my_other_schema; - make the connection read-only:
SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;
Less useful examples
Since you can execute arbitrary SQL you could also use this feature for fun things like posting a notification every time Postico opens a connection, with a startup query like this:
LISTEN new_connection;
NOTIFY new_connection, 'Postico opened a new connection!';
(Make sure Postico is allowed to post notifications in system preferences if you want to see the notifications on your screen)
Feedback wanted!
Does this feature make sense? Please let us know if this feature is useful for you, or if you have any suggestions.
Fantastic. I'd been subscribed to #207 for news on this. The "make the connection read-only" is just what I've been after. 👏
Summary of feedback on this feature so far:
- people would like a way to make these settings globally, similar to .psqlrc file (feedback received via email and here)
- one person suggested adding UI components for popular settings (eg. read-only mode)
It would be great if this could be passed in via connection URL, so that the helper scripts we use to open DB connections for local development (and in some cases production debugging) can do open … and have full control over the connection. At the moment we're going to need to have some manual instructions like "First create a favourite and set startup queries to …".