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
{{ message }}
Repository navigation
pgcli's equivalent to mycli's --init-command? #1499
--init-command TEXT SQL statement to execute after connecting.
Does pgcli have this?
Is it possible to specify the init commands in the config file ~/.config/pgcli/config? Ideally I want to specify different --init-command for different DSNs defined in [alias_dsn].
Activity
j-bennet commentedon Mar 22, 2025
pgclidoes not have the feature. I imagine it would not be difficult to port frommycli, if you have the bandwidth.Here is the mycli PR adding the feature:
dbcli/mycli#874
amjith commentedon Apr 20, 2025
@your-diary Can you try this pull-requests and let me know if that satisfies your request?
You can install pgcli from this branch using the following command:
your-diary commentedon Apr 20, 2025
@amjith
Thank you for your great work!
It's working as expected :)
Dockerfileandcompose.yamlfiles used for testing: dbcli/mycli#1195 (comment)your-diary commentedon Dec 11, 2025
Is there any plan to release the change?
The PR has already been merged.
ref:
changelog.rstj-bennet commentedon Dec 24, 2025
Good point. Release coming up: #1548.
j-bennet commentedon Dec 24, 2025
4.4.0 is out to pypi. Enjoy!