Re: Changing the continuation-line prompt in psql?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Changing the continuation-line prompt in psql?
Date: 2011-04-29 15:14:10
Message-ID: BANLkTimj9R=cCmYFQqRzwz3tZjuKiwo9ZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 29, 2011 at 17:09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2011-04-29 15:17:59 Re: "stored procedures" - use cases?
Previous Message Tom Lane 2011-04-29 15:09:58 Changing the continuation-line prompt in psql?