You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team,
I maintain some features for my daily work in my own fork (DiegoDAF/pgcli.daf), and maybe you want them.
Happy to open a PR for any of them. Just pick a number, and I will open the PR.
This is a list of pending items only. Anything that got merged is removed from it, so the numbers have gaps. The numbers themselves never change, because they are how people pick an item here.
SSH/connectivity
pgcli_dump and pgcli_dumpall: wrappers around pg_dump / pg_dumpall that auto-open the same SSH tunnel pgcli uses, so backups work through bastions transparently.
pgcli_isready: a pg_isready wrapper that is SSH-tunnel aware.
Native paramiko SSH tunnels (replacing the sshtunnel lib): reads IdentityFile from ~/.ssh/config, supports ProxyCommand and ProxyJump, configurable host key verification (host_key_policy), and allow_agent. Note that sshtunnel 0.4.0 reads only ProxyCommand from the config, so a host reachable only through a ProxyJump is dialed directly and fails to resolve.
Config in directories (drop-in files)
5. dsn.d/: DSN aliases as individual *.conf files instead of one big section.
6. Server-versioned named queries (namedqueries.d, psqlrc-style). Files in namedqueries.d/ can carry a version suffix in the filename, like psql's ~/.psqlrc-17: activity-17.conf is only offered when the connected server is 17+, and among variants of one query name the highest version <= the server wins (a suffix-less file is the fallback). Queries whose requirements the server doesn't meet disappear from \n entirely. The server version comes from the connection's startup packet, so there's no extra round-trip.
Non-interactive / scripting
8. -o/--output: redirect results to a file.
11. --no-timings and --no-status: quieter output for scripts. Open as #1637.
Autocompletion
13. SET <param> completion from live pg_settings.
14. SET ROLE <role> completion.
Output
15. Streaming NOTICE output: VACUUM VERBOSE, ANALYZE VERBOSE, REINDEX, etc. print server NOTICEs line by line as they arrive instead of buffering until the end.
22. stream_results config option: print each statement's result as soon as it finishes instead of buffering all of them until the end. Pasting several statements (select a; select b; select c;) shows each result live as its statement completes, similar to psql/pgAdmin. Off by default.
Safety
16. \restrict / \unrestrict support and blocking.
17. Password and path sanitization in logs.
Others
18. EXPLAIN analysis summary. With explain mode (F5) on, the plan tree is followed by a compact summary: slowest nodes by exclusive time, time grouped by relation, and the worst planner row-estimate misses. Inspired by pgAdmin's graphical explain. Config explain_summary, default off.
19. Query-tool niceties:\autocommit [on|off] (manual-transaction mode with a toolbar indicator), \hist [N] (this session's SQL with elapsed time and ok/error), and an F9 binding that runs only the selected text.
20. psql-style paste mode (paste_mode + F6): pasting a multi-statement block echoes each statement followed by its result, interleaved, like psql.
21. log_truncate_on_rotation (default off), like the PostgreSQL setting: with day-of-week/day-of-month log rotation, a slot's file is truncated when it comes around again instead of appending forever.
Next ones I would send, one at a time and only when the queue is short: item 8 (-o/--output), then item 6 (versioned namedqueries.d), then item 5 (dsn.d/).
On item 5 I would rather ask before writing the PR than after. Its original selling point was issue #1489, which is now closed by #1617, so the case rests on the drop-in format alone: one file per alias instead of one large section, which is what makes a few hundred aliases manageable. If maintainers would not take that format, say so and I will keep it in the fork and save us both a review.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi Team,
I maintain some features for my daily work in my own fork (DiegoDAF/pgcli.daf), and maybe you want them.
Happy to open a PR for any of them. Just pick a number, and I will open the PR.
This is a list of pending items only. Anything that got merged is removed from it, so the numbers have gaps. The numbers themselves never change, because they are how people pick an item here.
SSH/connectivity
pgcli_dumpandpgcli_dumpall: wrappers aroundpg_dump/pg_dumpallthat auto-open the same SSH tunnel pgcli uses, so backups work through bastions transparently.pgcli_isready: apg_isreadywrapper that is SSH-tunnel aware.paramikoSSH tunnels (replacing thesshtunnellib): readsIdentityFilefrom~/.ssh/config, supportsProxyCommandandProxyJump, configurable host key verification (host_key_policy), andallow_agent. Note thatsshtunnel0.4.0 reads onlyProxyCommandfrom the config, so a host reachable only through aProxyJumpis dialed directly and fails to resolve.Config in directories (drop-in files)
5.
dsn.d/: DSN aliases as individual*.conffiles instead of one big section.6. Server-versioned named queries (
namedqueries.d, psqlrc-style). Files innamedqueries.d/can carry a version suffix in the filename, like psql's~/.psqlrc-17:activity-17.confis only offered when the connected server is 17+, and among variants of one query name the highest version <= the server wins (a suffix-less file is the fallback). Queries whose requirements the server doesn't meet disappear from\nentirely. The server version comes from the connection's startup packet, so there's no extra round-trip.Non-interactive / scripting
8.
-o/--output: redirect results to a file.11.
--no-timingsand--no-status: quieter output for scripts. Open as #1637.Logging
12.
log_rotation_mode(none / day-of-week / day-of-month / date) andlog_destination.Autocompletion
13.
SET <param>completion from livepg_settings.14.
SET ROLE <role>completion.Output
15. Streaming NOTICE output:
VACUUM VERBOSE,ANALYZE VERBOSE,REINDEX, etc. print server NOTICEs line by line as they arrive instead of buffering until the end.22.
stream_resultsconfig option: print each statement's result as soon as it finishes instead of buffering all of them until the end. Pasting several statements (select a; select b; select c;) shows each result live as its statement completes, similar to psql/pgAdmin. Off by default.Safety
16.
\restrict/\unrestrictsupport and blocking.17. Password and path sanitization in logs.
Others
18. EXPLAIN analysis summary. With explain mode (F5) on, the plan tree is followed by a compact summary: slowest nodes by exclusive time, time grouped by relation, and the worst planner row-estimate misses. Inspired by pgAdmin's graphical explain. Config
explain_summary, default off.19. Query-tool niceties:
\autocommit [on|off](manual-transaction mode with a toolbar indicator),\hist [N](this session's SQL with elapsed time and ok/error), and an F9 binding that runs only the selected text.20. psql-style paste mode (
paste_mode+ F6): pasting a multi-statement block echoes each statement followed by its result, interleaved, like psql.21.
log_truncate_on_rotation(default off), like the PostgreSQL setting: with day-of-week/day-of-month log rotation, a slot's file is truncated when it comes around again instead of appending forever.Status (updated 2026-09-16)
Open right now:
--no-timingsand--no-status, as Add --no-timings and --no-status #1637. Opened 2026-09-15.SQL_ASCIIcrash fix (it closes issues startup crashes onTypeError: replace() argument 2 must be str, not bytes, followed byTypeError: cannot use a string pattern on a bytes-like object#1518 and pgcli crashes when using use directive #1484). Waiting on Fix encoding error when database encoding is ASCII #1629 by @dbaty, as agreed in that thread: Fix encoding error when database encoding is ASCII #1629 covers the common plain-ASCII case first, and the byte level fallback follows as a separate change.Next ones I would send, one at a time and only when the queue is short: item 8 (
-o/--output), then item 6 (versionednamedqueries.d), then item 5 (dsn.d/).On item 5 I would rather ask before writing the PR than after. Its original selling point was issue #1489, which is now closed by #1617, so the case rests on the drop-in format alone: one file per alias instead of one large section, which is what makes a few hundred aliases manageable. If maintainers would not take that format, say so and I will keep it in the fork and save us both a review.
All reactions