Magnus Hagander <mag...@hagander.net> writes:
> On Fri, Apr 29, 2011 at 17:09, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> ... 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.

Yeah, there is that.  I just went over to see what the competition does
here, and it looks like this:

mysql> select 2
    -> +2
    -> + 'foo
    '> bar
    '> baz'
    -> "quoted
    "> identifier"
    -> /*
   /*> comment */
    -> ;

AFAICT the initial prompt is always "mysql> ", so they don't have to
think hard about how many spaces to insert to make it line up.  But
we could certainly invent a prompt escape that means "as many spaces
as there are characters in the current DB name".  (Or maybe we should
try to generalize that idea, so you could get similar behavior for
custom prompts involving usernames etc?)

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to