Open 4orbit opened 1 year ago
I think it's not a bad idea to have an ability passing connstr
directly in arguments (with generation of content hosts.yaml
just in memory. not having it on file system).
so pass service=mydb
could be possible if we make this improvements.
but of course it would work only in limited scenarios: only one db is versionised in the cluster.
so! I guess we can create two variants of passing connstr
argument:
--db-type=mydb --connstr=service=mydb
.--db-service=mydb
(automaticly implies --db-type=mydb
and --connstr=service=mydb
). just a shortcut for variant "1." above.
Please, add ability using .pg_service.conf and .pgpass for database connection instead hosts.yaml file
example: ./pg-make-schemas service=mydb ... not need any hosts.yaml in command line
https://gist.github.com/tym-xqo/33baf67bb332cebc4b20f7211dbedf59#file-example-py here may see example
https://www.cybertec-postgresql.com/en/pg_service-conf-the-forgotten-config-file/