psql service parameter
I have just noticed that there does not seem to be a psql command line
switch to specify a pg_service.conf name to connect to. I know we can
use a PGSERVICE environment setting instead, but I think we should have
a command line switch too. Small 8.3 TODO item?
cheers
andrew
Andrew Dunstan <andrew@dunslane.net> writes:
I have just noticed that there does not seem to be a psql command line
switch to specify a pg_service.conf name to connect to. I know we can
use a PGSERVICE environment setting instead, but I think we should have
a command line switch too. Small 8.3 TODO item?
More generally, it'd be nice to be able to specify a PQconnectdb string,
instead of having to invent a new psql switch for every keyword we allow
in those strings.
regards, tom lane
Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
I have just noticed that there does not seem to be a psql
command line switch to specify a pg_service.conf name
to connect to. I know we can use a PGSERVICE environment
setting instead, but I think we should have
a command line switch too. Small 8.3 TODO item?More generally, it'd be nice to be able to specify a PQconnectdb
string,
instead of having to invent a new psql switch for every keyword we
allow
in those strings.
I think that both would be nice. Indeed, I wanted to suggest
a switch for PGSERVICE myself.
Ideas:
-n or --name for the service name
-C or --connect for the connect string
So, +1 on the original suggestion!
Yours,
Laurenz Albe
Import Notes
Resolved by subject fallback
On Wed, Sep 27, 2006 at 04:54:35PM +0200, Albe Laurenz wrote:
I think that both would be nice. Indeed, I wanted to suggest
a switch for PGSERVICE myself.
It some point I was wondering about using the @ symbol. If you have a
service entry called "testserver", you could do:
psql @testserver
But maybe that introduces too many quoting issues. Ofcourse, being able
to provide a complete connect string would be good too...
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
Show quoted text
From each according to his ability. To each according to his ability to litigate.
On Wed, Sep 27, 2006 at 10:23:13AM -0400, Andrew Dunstan wrote:
I have just noticed that there does not seem to be a psql command
line switch to specify a pg_service.conf name to connect to. I know
we can use a PGSERVICE environment setting instead, but I think we
should have a command line switch too. Small 8.3 TODO item?
The hack I've used so far is
PGSERVICE=/path/to/pg_service.conf psql
Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!