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
I'm currently not a go programmer myself, however looking at the code I might be able to create a proof-of-concept implementation.
Basically, what needs to happen that iff a service is specified, we need to read the libpq parameters from the Connection Service File. For a start, we could use the same logic (and limitations) as the pgpass reading: https://github.com/lib/pq/blob/master/conn.go#L159-L168
Questions:
Does anyone - other than me - think this is useful?
The Connection Service File is in an ini format, should we use an external ini (or toml) library to implement this?
I would love this. I've started using a ~/.pg_service.conf file for cleaner psql command line parameters and would be quite happy if I could use the same service=foo parameter for my PostgreSQL-using go programs.
@feikesteenbergen@cuboci I also agree this would be useful. It would help bridge the gap between Postgres clients in other languages like psycopg2 which implements this.
I too would love to see this feature implemented. I use a command line tool called migrate, which is written in go and uses lib/pq. I was surprised to learn that it didn't support the service file (especially given that it does support the pgpass file).
Activity
cuboci commentedon Feb 14, 2017
I would love this. I've started using a ~/.pg_service.conf file for cleaner psql command line parameters and would be quite happy if I could use the same service=foo parameter for my PostgreSQL-using go programs.
dskoda1 commentedon Apr 4, 2017
@feikesteenbergen @cuboci I also agree this would be useful. It would help bridge the gap between Postgres clients in other languages like
psycopg2which implements this.jl- commentedon Aug 5, 2018
Any update on this feature?
schoukri commentedon Oct 14, 2018
I too would love to see this feature implemented. I use a command line tool called migrate, which is written in go and uses lib/pq. I was surprised to learn that it didn't support the service file (especially given that it does support the pgpass file).
Support connection service file and service names
Support connection service file and service names
Support connection service file and service names
Support connection service file and service names
Support connection service file and service names
Support connection service file and service names
Support connection service file and service names
Implement connection service file
Implement connection service file
Implement connection service file
Implement connection service file