Re: [HACKERS] get rid of psql welcome message

2008-04-22 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Montag, 21. April 2008 schrieb Shane Ambler: >> What if the actual welcome message can be defined in the .psqlrc ? >> Something along the lines of - >> >> WELCOME_MESSAGE="Welcome to - \n" > You can do most of this already. It seems rather overd

Re: [HACKERS] get rid of psql welcome message

2008-04-22 Thread Peter Eisentraut
Am Montag, 21. April 2008 schrieb Shane Ambler: > What if the actual welcome message can be defined in the .psqlrc ? > Something along the lines of - > > WELCOME_MESSAGE="Welcome to - \n" This is basically equivalent to \echo Welcome to psql :VERSION blah. You can do most of this already. --

Re: [HACKERS] get rid of psql welcome message

2008-04-21 Thread Shane Ambler
This idea may be taking it to the extreme but I thought I'd throw it out there anyway as everyone seems to want something different. (well there seems to be three variants that if all were available would keep most people happy) This may be one way to please everyone. What if the actual welcome

Re: [HACKERS] get rid of psql welcome message

2008-04-20 Thread Joshua D. Drake
On Sun, 20 Apr 2008 14:25:36 -0400 Robert Treat <[EMAIL PROTECTED]> wrote: > Maybe we should add an additional paragraph to the psql welcome > message: > > "You can shorten or eliminate this welcome banner by modifying > your .psqlrc file and setting the WELCOME_MESSAGE to either "terse" > or "n

Re: [HACKERS] get rid of psql welcome message

2008-04-20 Thread Robert Treat
On Saturday 19 April 2008 20:14, Joshua D. Drake wrote: > Tom Lane wrote: > > I'm not against shortening the banner. What I'm against is turning this > > thing into a camel (a horse designed by a committee). We should take > > one approach or the other one, not both. > > O.k. that makes sense. I

Re: [HACKERS] get rid of psql welcome message

2008-04-20 Thread Peter Eisentraut
Peter Eisentraut wrote: > Mike Aubury wrote: > > Am I missing something.. > > > > $ psql -q testdb > > testdb=# > > This also quiets out a few other unrelated things. OK, I looked into the details of what the quiet mode does, and it turns out that it does exactly what I want, including dropping a

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: I am afraid the phrase "tab completion" is too complex for the type of people who need help. :-) Agreed, especially considering that it might be disabled depending on build and context. I think "Type help for help

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Tom Lane wrote: I'm not against shortening the banner. What I'm against is turning this thing into a camel (a horse designed by a committee). We should take one approach or the other one, not both. O.k. that makes sense. I have zero desire to take away from the work that Peter did. However,

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I am afraid the phrase "tab completion" is too complex for > > the type of people who need help. :-) > > Agreed, especially considering that it might be disabled depending > on build and context. > > I think "Type help for help." is

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Peter's patch is certainly useful but this is something quite different > but affecting some of the same behavior. My idea is all about the 99% of > people that don't use a .psqlrc. Should we not provide a simpler > interface that provides succinct

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I am afraid the phrase "tab completion" is too complex for > the type of people who need help. :-) Agreed, especially considering that it might be disabled depending on build and context. I think "Type help for help." is *exactly* the right amount of d

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Yes, we could do that, but in our last discussion of help we didn't want > 'help' to do anything but print pointers to the correct commands. Yeah, but that discussion wasn't considering the context of shortening or eliminating the welcome banner. The id

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Bruce Momjian wrote: Joshua D. Drake wrote: Actually in thinking about this more... I almost thing the default prompt should be: Does Win32 have tab completion? I am wondering if we should lose the tab and just print: I don't think it currently does but keep in mind that "most" windows us

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Joshua D. Drake wrote: > Actually in thinking about this more... I almost thing the default > prompt should be: > > - > psql version 8.2.7, server version 8.3.1 (some features may not work) > SSL: On {cert info} > Type help to get help (tab complete enabled) > - > > So on the prompt they can do:

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Joshua D. Drake wrote: > > How about: > > > > \? for psql help, \h for SQL help > > \g or ';' to execute a query > > \q to quit > > > > This would be more in line with our current process sure. However > something a little more radical might be cool :) > > help > returns: > \

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
help returns: \g to execute query help psql for psql help help sql for sql help Of course we would keep the pre-existing key sequences for those of us that have done this for the last decade :) Actually in thinking about this more... I almost thing the default prompt should be:

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Bruce Momjian wrote: I realize that, but my point is that when they type 'help', they don't get help; they just get details on the help options, and then they get help. oh... hmpf. How about: \? for psql help, \h for SQL help \g or ';' to execute a query \q to quit

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > > I realize that, but my point is that when they type 'help', they don't > > get help; they just get details on the help options, and then they get > > help. > > So let's improve "help", For instance with an introductory text on the > difference o

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Alvaro Herrera
Bruce Momjian wrote: > I realize that, but my point is that when they type 'help', they don't > get help; they just get details on the help options, and then they get > help. So let's improve "help", For instance with an introductory text on the difference of psql commands and SQL commands. > H

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Joshua D. Drake wrote: > Bruce Momjian wrote: > > > I am thinking 'help' is too much indirection for users -- it just tells > > them another command. How about: > > > > \g or ';' to execute a query\n" > > \? and \h for help > > \q to quit > > I have to disagree here. \h is completel

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Bruce Momjian wrote: I am thinking 'help' is too much indirection for users -- it just tells them another command. How about: \g or ';' to execute a query\n" \? and \h for help \q to quit I have to disagree here. \h is completely counterintuitive to a "user", let alo

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Alvaro Herrera wrote: > Peter Eisentraut wrote: > > > --- 326,337 > > printf(_("Welcome to %s %s, the PostgreSQL > > interactive terminal.\n\n"), > >pset.progname, PG_VERSION); > > > > ! if (!(var_welcom

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Alvaro Herrera
Peter Eisentraut wrote: > --- 326,337 > printf(_("Welcome to %s %s, the PostgreSQL > interactive terminal.\n\n"), > pset.progname, PG_VERSION); > > ! if (!(var_welcome_message && > strcmp(var_welco

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Tom Lane wrote: Yes. Which was part of the discussion: ... a rejected part of the discussion, according to Peter's conclusion. Obviously not to others. It certainly doesn't make very much sense to do it in combination with this patch, since if the standard help text is cut to one line who's

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> So you're arguing to change the default. > Yes. Which was part of the discussion: ... a rejected part of the discussion, according to Peter's conclusion. It certainly doesn't make very much sense to do it in combination with this

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Bruce Momjian
Peter Eisentraut wrote: > Joshua D. Drake wrote: > > My thoughts are to have the initial prompt look something like this: > > > > -- > > psql 8.1.10 - Server version 8.2.7 (some features may not work) > > > > Type: \h for SQL help, \? for psql help, \q to quit > > > > SSL: On {cert info} > > -- >

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Peter Eisentraut wrote: Joshua D. Drake wrote: My thoughts are to have the initial prompt look something like this: -- psql 8.1.10 - Server version 8.2.7 (some features may not work) Type: \h for SQL help, \? for psql help, \q to quit SSL: On {cert info} -- I think the information that you

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Peter Eisentraut
Joshua D. Drake wrote: > My thoughts are to have the initial prompt look something like this: > > -- > psql 8.1.10 - Server version 8.2.7 (some features may not work) > > Type: \h for SQL help, \? for psql help, \q to quit > > SSL: On {cert info} > -- I think the information that you use \g or sem

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: My thoughts are to have the initial prompt look something like this: So you're arguing to change the default. Yes. Which was part of the discussion: http://archives.postgresql.org/pgsql-hackers/2008-04/msg01250.php http://archive

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > My thoughts are to have the initial prompt look something like this: So you're arguing to change the default. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your s

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: I would like to submit a further patch that has the one line screen (although I think it will be two), Um, what's the point? Someone who knows enough to set WELCOME_MESSAGE in ~/.psqlrc is unlikely to need a one-line help reminder,

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > I would like to submit a further patch that has the one line screen > (although I think it will be two), Um, what's the point? Someone who knows enough to set WELCOME_MESSAGE in ~/.psqlrc is unlikely to need a one-line help reminder, so I don't see

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Joshua D. Drake
Tom Lane wrote: Peter Eisentraut <[EMAIL PROTECTED]> writes: I think everyone will find a mode they like here. +1. A marginal style suggestion: if you did var_welcome_message = GetVariable(pset.vars, "WELCOME_MESSAGE"); if (!var_welcome_message) var_welcome_me

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I think everyone will find a mode they like here. +1. A marginal style suggestion: if you did var_welcome_message = GetVariable(pset.vars, "WELCOME_MESSAGE"); if (!var_welcome_message) var_welcome_message = ""; then

Re: [HACKERS] get rid of psql welcome message

2008-04-19 Thread Peter Eisentraut
Stephen Frost wrote: > I'd recommend an option in .psqlrc to disable it, if possible. That > would be in line with what alot of other "splash-screen" type things do. I like that idea. Here is a minimal patch that allows you to put \set WELCOME_MESSAGE none or \set WELCOME_MESSAGE terse into

Re: [HACKERS] get rid of psql welcome message

2008-04-18 Thread Robert Treat
On Friday 18 April 2008 00:24, Joshua D. Drake wrote: > On Fri, 18 Apr 2008 00:21:58 -0400 > > Robert Treat <[EMAIL PROTECTED]> wrote: > > > We could just do: > > > > > > psql 8.1.10 - postgresql server version 8.1.10 > > > > > > Type: \h for SQL help, \? for psql help, \q to quit > > > > > > postg

Re: [HACKERS] get rid of psql welcome message

2008-04-18 Thread Naz Gassiep
Tom Lane wrote: Well, in general the *variable* parts of the banner were all put there because of fairly urgent need, and I'd resist removing them. It's the unchanging boilerplate that seems open to debate. I'm +1 for cutting that down to a single line. I don't care one way or the other about

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Joshua D. Drake
On Fri, 18 Apr 2008 00:42:06 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > I'm +1 for cutting that down to a single line. I don't care one way > or the other about providing a .psqlrc option to suppress it > altogether. Peter do you want to run with this, or would you mind if I worked up a patch?

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > I think it's getting overlooked because most people don't deal with it, but I > really think we need to keep the SSL info as is. Well, in general the *variable* parts of the banner were all put there because of fairly urgent need, and I'd resist removing

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Joshua D. Drake
On Fri, 18 Apr 2008 00:21:58 -0400 Robert Treat <[EMAIL PROTECTED]> wrote: > > We could just do: > > > > psql 8.1.10 - postgresql server version 8.1.10 > > > > Type: \h for SQL help, \? for psql help, \q to quit > > > > postgres=# > > I think it's getting overlooked because most people don't deal

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Robert Treat
On Thursday 17 April 2008 12:04, Joshua D. Drake wrote: > On Thu, 17 Apr 2008 11:11:58 -0400 > > Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > Brendan Jurd wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > On Fri, Apr 18, 2008 at 12:36 AM, Tom Lane wrote: > > >> Peter Ei

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Chris Browne
[EMAIL PROTECTED] (Stephen Frost) writes: > * Peter Eisentraut ([EMAIL PROTECTED]) wrote: >> Around >> it >> was proposed to truncate the psql welcome screen. What do you think about >> that? > > I'd recommend an option in .psq

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Andreas 'ads' Scherbaum
On Thu, 17 Apr 2008 09:30:04 -0400 Stephen Frost wrote: > * Peter Eisentraut ([EMAIL PROTECTED]) wrote: > > Around > > it > > was proposed to truncate the psql welcome screen. What do you think about > > that? > > I'd recomme

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Andreas 'ads' Scherbaum
On Thu, 17 Apr 2008 15:58:10 +0200 Peter Eisentraut wrote: > Mike Aubury wrote: > > Am I missing something.. > > > > $ psql -q testdb > > testdb=# > > This also quiets out a few other unrelated things. Like all \timing messages *grumble* -- Andreas 'ads' Scherba

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Shane Ambler
Simon Riggs wrote: On Thu, 2008-04-17 at 09:30 -0400, Stephen Frost wrote: * Peter Eisentraut ([EMAIL PROTECTED]) wrote: Around it was proposed to truncate the psql welcome screen. What do you think about that? I'd recommend

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > We could just do: > > psql 8.1.10 - postgresql server version 8.1.10 > > Type: \h for SQL help, \? for psql help, \q to quit Best idea yet. I also still like the .psqlrc no-splash option, no reason we can't do both. - -- Greg Sabino Mullane

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Joshua D. Drake
On Thu, 17 Apr 2008 11:11:58 -0400 Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > Brendan Jurd wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Fri, Apr 18, 2008 at 12:36 AM, Tom Lane wrote: > > > >> Peter Eisentraut writes: > >> > Around it > >> > was proposed to

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Andrew Dunstan
Brendan Jurd wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Apr 18, 2008 at 12:36 AM, Tom Lane wrote: Peter Eisentraut writes: > Around it > was proposed to truncate the psql welcome screen. What do you think about > that? Personally. I'm very seriously against losin

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Apr 18, 2008 at 12:36 AM, Tom Lane wrote: > Peter Eisentraut writes: > > Around it > > was proposed to truncate the psql welcome screen. What do you think about > > that? > > Personally. I'm very seriously against losing the version num

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Around it > was proposed to truncate the psql welcome screen. What do you think about > that? Personally. I'm very seriously against losing the version number banner. I could do wi

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Simon Riggs
On Thu, 2008-04-17 at 09:30 -0400, Stephen Frost wrote: > * Peter Eisentraut ([EMAIL PROTECTED]) wrote: > > Around > > it > > was proposed to truncate the psql welcome screen. What do you think about > > that? > > I'd recommen

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Peter Eisentraut
A. Kretschmer wrote: > I'd vote No, because i see very often on #irc people asking something > like 'how can i see the table definition' or other, and in this cases > it's easy to say: hey dude, read the fine welcome message *g* I take this as evidence that the welcome message has limited use in p

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Peter Eisentraut
Mike Aubury wrote: > Am I missing something.. > > $ psql -q testdb > testdb=# This also quiets out a few other unrelated things. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread A. Kretschmer
am Thu, dem 17.04.2008, um 14:39:43 +0200 mailte Peter Eisentraut folgendes: > Around it > was proposed to truncate the psql welcome screen. What do you think about > that? > > Personally, I'd get rid of it all, because it get

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Mike Aubury
Am I missing something.. $ psql -q testdb testdb=# And - if you're using bash - you could just $ alias "psql=psql -q" $ psql testdb testdb=# On Thursday 17 April 2008 13:39:43 Peter Eisentraut wrote: > Around > it was pro

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread paul rivers
Peter Eisentraut wrote: Around it was proposed to truncate the psql welcome screen. What do you think about that? Personally, I'd get rid of it all, because it gets boring after about three uses, so that we would be at [EM

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Stephen Frost
* Peter Eisentraut ([EMAIL PROTECTED]) wrote: > Around it > was proposed to truncate the psql welcome screen. What do you think about > that? I'd recommend an option in .psqlrc to disable it, if possible. That would be in line

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Simon Riggs
On Thu, 2008-04-17 at 14:39 +0200, Peter Eisentraut wrote: > Personally, I'd get rid of it all, because it gets boring after about three > uses, so that we would be at Many people I speak to use Postgres every 6 months or so, so changes like this make them think its broke when its not. I'd vote

Re: [HACKERS] get rid of psql welcome message

2008-04-17 Thread Magnus Hagander
Peter Eisentraut wrote: > Around > > it was proposed to truncate the psql welcome screen. What do you > think about that? > > Personally, I'd get rid of it all, because it gets boring after about > three uses, so that we would be

[HACKERS] get rid of psql welcome message

2008-04-17 Thread Peter Eisentraut
Around it was proposed to truncate the psql welcome screen. What do you think about that? Personally, I'd get rid of it all, because it gets boring after about three uses, so that we would be at [EMAIL PROTECTED]:~$ psql test