pgMui is a minimalistic UI for PostgreSQL: the user can connect to a database and write and execute SQL queries.
Getting pgMui
The full source is available at https://codeberg.org/janburle/pgMui.
The files needed to use pgMui are in pgMui.zip. Simply unpack it and run.
unzip pgMui.zip
cd pgMui
./run.sh
The first launch of run.sh creates a virtual environment in .venv/ and installs packages from requirements.txt. Later launches reuse that
environment.
Requirements
You need:
-
Python 3.12 or newer
-
A running PostgreSQL server: the source repository has a Docker Compose file in the
testDb/directory that can be used for this purpose. -
On Debian/Ubuntu, Qt’s xcb plugin needs
libxcb-cursor0:
sudo apt install libxcb-cursor0
Using pgMui
pgMui has a single window with:
-
a SQL editor on the left
-
a result table on the right
-
a toolbar at the top
-
a status bar at the bottom
Toolbar
The toolbar provides (left to right):
-
Connect… — open the connection dialog
-
Disconnect — close the current connection
-
Run — execute the SQL query (Ctrl+Return)
-
Clear — empty the editor and result table
-
Dark / Light — toggle the colour scheme
-
Quit — exit the application (Ctrl+Q)
Status bar
The status bar shows the current connection on the left and a short result notice on the right.
Connecting to a database
Connect… opens a connection dialog. A successful connection stores connection values to a configuration file, including the password.
|
Set the |
To use another database, choose Connect… again; pgMui opens the new connection and closes the previous one.
Running a query
Running a query requires that a database is connected. Click the Run button on the toolbar, or press Ctrl+Return.
If there is a selection, only the selected text is sent to the database server; otherwise the entire editor content is sent. The database connection uses autocommit mode: each statement is its own transaction.