On Tue, Oct 23, 2012 at 6:22 PM, Christopher Browne <cbbro...@gmail.com> wrote: > On Tue, Oct 23, 2012 at 6:12 PM, Peter Eisentraut <pete...@gmx.net> wrote: >> On 10/22/12 11:47 AM, Phil Sorber wrote: >> Also, it seems that about 75% of the patch is connection options processing. >> How about >> we get rid of all that and just have them specify a connection string? It >> would be a break >> with tradition, but maybe it's time for something new. > > I'd be pretty pleased if it had just two ways to get configured: > a) A connection string (which might, in the new order of things, be a > JDBC-like URI), or > b) Environment values drawn in from PGHOST/PGPORT/...
When I first wrote this for my own purposes it was basically 'return PQping("");' with the necessary glue around it and I used the env var's exactly as you describe. I ended up adding connection parameters to satisfy the ops guy who was having trouble integrating it how we wanted to use it. I figured that to go in core it would need that anyway. I'm not sure why we would want to prevent people from using command line options like that. That is often the most intuitive way to use a tool. Either way I think this is probably a separate debate entirely. > > That's pretty much enough configurability, I'd think. > >> Functionality: >> >> I'm missing the typical ping functionality to ping continuously. If we're >> going to call >> it pg_ping, it ought to do something similar to ping, I think. > > Yep, should have equivalents to: > -i, an interval between pings, > -c, a count > -w/-W, a timeout interval Like I replied to Peter above, I'm not sure it fits the mold of the ping network utility. If you think it needs a different name please propose one. I'm not totally closed off to this idea, it's just not what I had in mind when I put it together. If people find it useful, I can add it. > > Might be nice to have analogues to: > -D printing timestamp before each line > -q quiets output > -v verbose output (got it, check!) > -V version (got it, check!) Right now it outputs nothing by default. I suppose I could change it to output "Accepting/Rejecting Connections" by default, and verbose can add the connection info. Thoughts? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers