Re: Concurrent psql patch - Mailing list pgsql-patches

From Gregory Stark
Subject Re: Concurrent psql patch
Date
Msg-id 871whjcwcu.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Concurrent psql patch  ("Jim C. Nasby" <decibel@decibel.org>)
Responses Re: Concurrent psql patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Jim C. Nasby" <decibel@decibel.org> writes:

> Would \c# limit us to 9 concurrent connections? Might want
>
> \cs[witch] [session]

Hm, we kind of have a choice with \c#. Either we treat it as part of the
command in which case the way to connect to an integer-named database is to
include a space. We could even have it magically connect to a database if the
connection isn't already active.

But these kinds of inconsistent behaviours can be traps for users. It means
"\c1" and "\c 1" do different things even though "\cpostgres" and \c postgres"
do the same thing. And it means "\c1" might connect to a database named "1"
today but switch sessions tomorrow.

Or we treat it as the first argument in which case even "\c 9" switches to
session 9. I would prefer to do that but I fear there may be people with
databases named "9".

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


pgsql-patches by date:

Previous
From: Greg Smith
Date:
Subject: Re: Automatic adjustment of bgwriter_lru_maxpages
Next
From: Tom Lane
Date:
Subject: Re: Concurrent psql patch