Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgcli's equivalent to mycli's --init-command? #1499

Open
your-diary opened this issue Mar 19, 2025 · 1 comment
Open

pgcli's equivalent to mycli's --init-command? #1499

your-diary opened this issue Mar 19, 2025 · 1 comment

Comments

@your-diary
Copy link

mycli supports --init-command option:

--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].

@j-bennet
Copy link
Contributor

j-bennet commented Mar 22, 2025

pgcli does not have the feature. I imagine it would not be difficult to port from mycli, if you have the bandwidth.

Here is the mycli PR adding the feature:

dbcli/mycli#874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants