jakob / jakob/Postico

New feature in Postico 2: Startup Queries

Open
#702 6 comments 12 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
485
Forks
8
PR merge metrics
No merged PRs in 30d

Description

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:
Screenshot 2020-04-16 at 14 39 43

## 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:

```sql
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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the Startup Queries behavior described for Postico 2 Preview Build 6450 and the six comments for concrete feedback. The issue names no files, tests, implementation task, or acceptance criteria, so a contributor should first identify a specific change before defining what done means.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.