Re: New version of psql - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: New version of psql
Date
Msg-id Pine.LNX.4.20.9911061417460.347-100000@peter-e.yi.org
Whole thread Raw
In response to New version of psql  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: New version of psql  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] Re: New version of psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1999-11-04, Bruce Momjian mentioned:

> OK, new version of psql installed.  Only problem I see is that \h shows
> TRUNCATE as the first help item.  I assume the directory contents are
> not being sorted.  Peter?
> 
> Second, the new psql prompt is #, so it shows as:
> 
>     test-#
> 
> Not sure I like that.  I liked the > better, I think, unless # grows on
> me.

The new prompt is the same as the the old one. *** Scratches head ***

The '>' is replaced by a '#' if you are the superuser. (Correction: if the
username is "postgres". I'm still thinking about ways to make this a
little more elegant though. Ideas welcome.)

The '-' shouldn't be there unless you're in continue mode, as usual. Works
for me:

testdb=> select *
testdb-> from foo;
ERROR:  foo: Table does not exist.
testdb=> \c - postgres
You are now connected as new user postgres.
testdb=# select *
testdb-# from foo;
ERROR:  foo: Table does not exist.

Of course you can also completely customize your prompt. See the docs for
that.
-Peter

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] New version of psql
Next
From: Peter Eisentraut
Date:
Subject: Re: New version of psql