psql commandline conninfo

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: psql commandline conninfo
Date: 2006-12-12 21:24:12
Message-ID: 457F1DFC.1030609@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I have been working on providing psql with the ability to accept a libpq
conninfo string, so that the following now works for me:

psql "conn:service=sname user=uname"

Instead of providing yet another switch, I overloaded the dbname
parameter so that if it has the recognised prefix the remainder is
treated as a conninfo string. I have 3 questions:

1. Is this a good way to go, or should we just provide yet another switch?
2. If this is ok, what should the prefix be? is "conn:" ok?
3. Should we append settings from other switches to the conninfo (e.g.
-U or -h), or should we just ignore them? If we ignore them should we
warn about that if they are present?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-12-12 21:52:15 Re: psql commandline conninfo
Previous Message Bruce Momjian 2006-12-12 20:26:32 Re: Grouped Index Tuples

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-12-12 21:52:15 Re: psql commandline conninfo
Previous Message Richard Huxton 2006-12-12 17:58:17 Re: date comparisons