Re: psql \l error

SAKAIDA Masaaki <sakaida@psn.co.jp>

From: SAKAIDA <sakaida@psn.co.jp>
To: pgsql-hackers@postgreSQL.org
Cc: Peter Eisentraut <peter_e@gmx.net>
Date: 2000-05-02T09:17:13Z
Lists: pgsql-hackers
Peter Eisentraut <e99re41@DoCS.UU.SE> wrote:

> On Tue, 2 May 2000, Tom Lane wrote:
> 
> > I think there are some other small incompatibilities between 7.0 psql
> > and pre-7.0 servers anyway, so eliminating this one by dumbing down \l
> > is probably not the way to proceed.
> 
> The oidvector thing is essentially a show stopper for this.

  In my client software named PGBASH-2.1, I have dealt with "\l" 
compatibility problem as following.

 query1= SELECT pg_database.datname ..
         pg_encoding_to_char(pg_database.encoding) as \"Encoding\" ..
         ..
 query2= SELECT pg_database.datname ..
         pg_database.encoding as \"Encoding\" ..
         ..

  1. Make pset->quiet quiet mode.
  2. Send query1.
  3. Make pset->quiet original mode. 
  3. If error occurs then send query2.

--
Regards,
SAKAIDA Masaaki  -- Osaka, Japan