Re: Changing the continuation-line prompt in psql? - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Changing the continuation-line prompt in psql?
Date
Msg-id BANLkTimj9R=cCmYFQqRzwz3tZjuKiwo9ZA@mail.gmail.com
Whole thread Raw
In response to Changing the continuation-line prompt in psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Changing the continuation-line prompt in psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Apr 29, 2011 at 17:09, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Over at
> http://archives.postgresql.org/pgsql-novice/2011-04/msg00102.php
> there's an interesting thread about a novice who forgot to put a
> semicolon at the end of his SQL commands, and what psql might do to be
> a little more friendly at the beginning of the learning curve.  We see
> similar complaints every so often, so it seems like something that would
> be worth doing something about.  Several ideas were mentioned, but the
> one that seemed to get the most approval was to make psql's PROMPT2
> (the continuation line prompt) more visibly different from PROMPT1.
> I've got to agree that the difference between
>
>        postgres=>
>        postgres->
>
> is on the subtle side.  Two different possible changes were suggested:
>
> * Drop the database name from PROMPT2, so you see
>
>        postgres=>
>        ->

Definite -1 on that option - your query no longer lines up, and if you
then for example open it in an editor, indentation changes.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Changing the continuation-line prompt in psql?
Next
From: Jim Nasby
Date:
Subject: Re: "stored procedures" - use cases?