psql service parameter

Поиск
Список
Период
Сортировка
Искать

psql service parameter

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:

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

Re: psql service parameter

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andrew Dunstan  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

Re: psql service parameter

От:
"Albe Laurenz" <all@adv.magwien.gv.at>
Дата:
Tom Lane wrote:
> Andrew Dunstan  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

Re: psql service parameter

От:
Martijn van Oosterhout <kleptog@svana.org>
Дата:
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      http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Re: psql service parameter

От:
David Fetter <david@fetter.org>
Дата:
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  http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!

FAQ