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

Use database comments to filter what we should show in lists #53

Open
sastraxi opened this issue Nov 21, 2019 · 0 comments
Open

Use database comments to filter what we should show in lists #53

sastraxi opened this issue Nov 21, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@sastraxi
Copy link
Owner

Currently, we accept a prefix option in the list command to make the output have a higher signal-to-noise when you have multiple projects' databases in your postgres instance.

Another approach is to use COMMENT ON [...] to automatically attach some psql-specific metadata in the database whenever we create databases, and filter to those databases that match the comment.

The proposal is to add something like this to .pgshrc:

{
  auto_comment: 'my_project_name',
}

This would enable both setting comments on creation / cloning and, by default, only showing those databases that match the comment (as well as the current database). We'd probably want to add an option to the list command to ignore all filters set in .pgshrc, as well as to filter to a different comment.

See https://stackoverflow.com/questions/11493978/how-to-retrieve-the-comment-of-a-postgresql-database

@sastraxi sastraxi added the enhancement New feature or request label Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant