Re: Patch to change psql default banner v6

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: daveg <daveg(at)sonic(dot)net>
Cc: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to change psql default banner v6
Date: 2008-05-15 21:17:40
Message-ID: 200805152117.m4FLHeL11571@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

daveg wrote:
> On Thu, May 15, 2008 at 10:20:53AM -0700, Ron Mayer wrote:
> > Alvaro Herrera wrote:
> > >Andrew Dunstan wrote:
> > >
> > >>Welcome to UI development. There is always *far* more argument of minor
> > >>matters of appearance than over anything else, in my experience.
> > >
> > >Which is a good thing (in this case at least), because otherwise we
> > >would end up with a crappy UI just because a single person thinks it's
> > >"good enough".
> >
> >
> > This makes me think we shouldn't be hard-coding anything at all
> > as the welcome message; but rather having a default .psqlrc
> > in much the same way that that there's a default /etc/bash.bashrc
> > and /etc/csh.login.
> >
> > Within that default .psqlrc we can put
> > \qecho "Whatever the default message is"
> > or
> > select "my message "+version();
> > to create the default, but then anyone with their own .psqlrc
> > can re-define it to whatever they think is a "good enough" UI.
>
> +1
> Including no banner at all please.

There is a psql quiet option that shows no banner:

-q
--quiet
Specifies that psql should do its work quietly. By
default, it prints welcome messages and various
informational output. If this option is used, none
of this happens. This is useful with the -c option.
Within psql you can also set the QUIET variable to
achieve the same effect.

You could then use \echo in .psqlrc to make your own banner.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Chernow 2008-05-15 21:18:59 Re: libpq object hooks
Previous Message Teodor Sigaev 2008-05-15 20:52:41 Re: Partial match in GIN (next vesrion)