Thread: get rid of psql welcome message
Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 peter@colt:~$ psql testdb testdb=# The version mismatch warning would remain, of course. I'd also like to get rid of the SSL notice but I'm not sure what to replace it by. Something in the prompt perhaps? Btw., any user could put the welcome message in his own psqlrc file via \echo commands in case they are really attached to it.
Peter Eisentraut wrote: > Around > <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> > 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 If we have readline installed, we could perhaps have it show the first time you launch psql, but if there is a .psql_history file around, don't show it? > peter@colt:~$ psql testdb > testdb=# > > The version mismatch warning would remain, of course. > > I'd also like to get rid of the SSL notice but I'm not sure what to > replace it by. Something in the prompt perhaps? That would work. It just has to keep being possible to quickly see if a connection is secured. //Magnus
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 No, because personally I find software that changes for no good reason to be boring, potentially bug causing and requires many screenshots and HOWTOs of the software to become outdated. I do strongly support your efforts to improve usability though but let's keep stuff that works the same. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com
* Peter Eisentraut (peter_e@gmx.net) wrote: > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 with what alot of other "splash-screen" type things do. Thanks, Stephen
Peter Eisentraut wrote: > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 > > peter@colt:~$ psql testdb > testdb=# > > The version mismatch warning would remain, of course. > > I'd also like to get rid of the SSL notice but I'm not sure what to replace it > by. Something in the prompt perhaps? > > Btw., any user could put the welcome message in his own psqlrc file via \echo > commands in case they are really attached to it. > > If you do this, adding psql internal variables so a prompt could be built would be a nice way to go. For a default, perhaps nothing special at all to flag the connection as ssl? If it matters to someone, they can always set their prompt default to include this, set pgsslmode appropriately, or call ensure sslinfo is installed and use it. Is it worth promoting sslinfo into the core and adding a few new functions to expose at least the same information (cypher, etc)? While this isn't strictly related to what you're up to, sslinfo is a very nice complement for arbitrary programs to confirm they are talking ssl.
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 <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> > 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 > > peter@colt:~$ psql testdb > testdb=# > > The version mismatch warning would remain, of course. > > I'd also like to get rid of the SSL notice but I'm not sure what to replace > it by. Something in the prompt perhaps? > > Btw., any user could put the welcome message in his own psqlrc file via > \echo commands in case they are really attached to it. -- Mike Aubury Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
am Thu, dem 17.04.2008, um 14:39:43 +0200 mailte Peter Eisentraut folgendes: > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 > > peter@colt:~$ psql testdb > testdb=# 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* Okay, maybe a new switch on the command-line or a .psqlrc-parameter to suppress this message... Regards, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Mike Aubury wrote: > Am I missing something.. > > $ psql -q testdb > testdb=# This also quiets out a few other unrelated things.
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 practice. The recently added "help" command will probably be (minimally) more suited to these kinds of people.
On Thu, 2008-04-17 at 09:30 -0400, Stephen Frost wrote: > * Peter Eisentraut (peter_e@gmx.net) wrote: > > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 with what alot of other "splash-screen" type things do. +1 -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com
Peter Eisentraut <peter_e@gmx.net> writes: > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 without any of the rest of it. regards, tom lane
-----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 number banner. > I could do without any of the rest of it. > +1 for keeping the version number up there. Cheers, BJ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: http://getfiregpg.org iD8DBQFIB2Mx5YBsbHkuyV0RAjhZAJ9wCS4EjQOGb5sJPJLC0yd/CtSWRgCeJ/pi cQ1qMGtQjsDo7IOiKvPfUNU= =W8uL -----END PGP SIGNATURE-----
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 losing the version number banner. >> I could do without any of the rest of it. >> >> > > +1 for keeping the version number up there. > > > A prompt escape for the version would actually be nice. cheers andrew
On Thu, 17 Apr 2008 11:11:58 -0400 Andrew Dunstan <andrew@dunslane.net> 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 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 without any of the rest of it. Currently our prompt is fairly verbose: Welcome to psql 8.1.10, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g orterminate with semicolon to execute query \q to quit 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=# -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit
-----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 greg@turnstep.com End Point Corporation PGP Key: 0x14964AC8 200804171238 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkgHfOwACgkQvJuQZxSWSsiqVgCgmICB56XnU0+fuPiAblPmYJmU CcsAoL4T+3hh3wA04nzrrt3R2ioQeJ69 =YTw/ -----END PGP SIGNATURE-----
Simon Riggs wrote: > On Thu, 2008-04-17 at 09:30 -0400, Stephen Frost wrote: >> * Peter Eisentraut (peter_e@gmx.net) wrote: >>> Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 with what alot of other "splash-screen" type things do. > > +1 > +1 I honestly don't care that I get a few lines of garbage as I start psql - I never really look at it myself (the first dozen times I used pg it was probably helpful to have the help commands there). So what if you get a few lines of text as you start a program, it scrolls off the screen with everything else, it doesn't fill up your drive in log files and I doubt the 250 bytes being sent across the network for those running remotely is going to chew up anyone's bandwidth allocation. I do think that an rc file option (or even a ./configure option if you want to go that far) is fine for those in the know to adjust to their tastes - a better option than not show it once a .psql_history exists. -- Shane Ambler pgSQL (at) Sheeky (dot) Biz Get Sheeky @ http://Sheeky.Biz
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' Scherbaum German PostgreSQL User Group
On Thu, 17 Apr 2008 09:30:04 -0400 Stephen Frost wrote: > * Peter Eisentraut (peter_e@gmx.net) wrote: > > Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 with what alot of other "splash-screen" type things do. As long as the default is to display the welcome message, that's ok. Like Simon explained it would be no good if we change the default behavior. Kind regards -- Andreas 'ads' Scherbaum German PostgreSQL User Group
sfrost@snowman.net (Stephen Frost) writes: > * Peter Eisentraut (peter_e@gmx.net) wrote: >> Around <http://archives.postgresql.org/pgsql-patches/2008-01/msg00089.php> 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 with what alot of other "splash-screen" type things do. Shorten: Welcome to psql 8.1.9 (server 8.1.8), the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g orterminate with semicolon to execute query \q to quit To: psql 8.1.9 (server 8.1.8) - PostgreSQL interactive terminal Type: \h for SQL help, \? for psql help, \q to quit which removes 3/4 of the "bloat," whilst only losing info about \copyright and \g. That's close enough to an 80% improvement for me. That *would* be a big win in doing cut'n'paste of psql sessions, and while the experienced user may not care about \h, \?, and \q, I'd miss getting the version information. There's enough room still there, by the way, that one might cleverly add in the port number without forcing the addition of an extra line, which could be useful material, even in a cut'n'paste... -- (format nil "~S@~S" "cbbrowne" "linuxfinances.info") http://www3.sympatico.ca/cbbrowne/spiritual.html Editing is a rewording activity. -- Alan J. Perlis [And EMACS a rewording editor. Ed.]
On Thursday 17 April 2008 12:04, Joshua D. Drake wrote: > On Thu, 17 Apr 2008 11:11:58 -0400 > > Andrew Dunstan <andrew@dunslane.net> 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 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 without any of the rest of it. > > Currently our prompt is fairly verbose: > > Welcome to psql 8.1.10, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > > 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 with it, but I really think we need to keep the SSL info as is. Actually I think we ought to keep the whole thing and just add the no-splash option for advanced users, but barring that, the SSL info is very handy when you're working on SSL enabled servers. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
On Fri, 18 Apr 2008 00:21:58 -0400 Robert Treat <xzilla@users.sourceforge.net> 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 with > it, but I really think we need to keep the SSL info as is. Actually > I think we ought to keep the whole thing and just add the no-splash > option for advanced users, but barring that, the SSL info is very > handy when you're working on SSL enabled servers. > Is it enough to say "SSL: On"? Or do you want all the cert stuff? Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit
Robert Treat <xzilla@users.sourceforge.net> 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 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 providing a .psqlrc option to suppress it altogether. regards, tom lane
On Fri, 18 Apr 2008 00:42:06 -0400 Tom Lane <tgl@sss.pgh.pa.us> 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? Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit
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 providing a .psqlrc option to suppress it altogether. > It could be that even optional removal of the version number is a foot-gun for users who perhaps carelessly lose track of which version they are running and do something with it (such as rsync with another server's data dir or something silly like that) expecting the wrong version. I don't see how, if it were reduced to a single line, the indication of version number could possibly be considered problematic under any circumstances. Regards, - Naz.
On Friday 18 April 2008 00:24, Joshua D. Drake wrote: > On Fri, 18 Apr 2008 00:21:58 -0400 > > Robert Treat <xzilla@users.sourceforge.net> 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 with > > it, but I really think we need to keep the SSL info as is. Actually > > I think we ought to keep the whole thing and just add the no-splash > > option for advanced users, but barring that, the SSL info is very > > handy when you're working on SSL enabled servers. > > Is it enough to say "SSL: On"? Or do you want all the cert stuff? > I want the cert stuff. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
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 .psqlrc. The latter keeps the version information but omits the information about the backslash commands. I didn't change any of the message wordings. Simon's argument that screenshots and HOWTOs would need to be updated is not invalid. I think everyone will find a mode they like here.
Peter Eisentraut <peter_e@gmx.net> 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 the subsequent tests would not need null-guards and would become much more readable IMHO. regards, tom lane
Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> 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 the subsequent tests would not need null-guards and would become > much more readable IMHO. I would like to submit a further patch that has the one line screen (although I think it will be two), should I wait for this to be applied, apply it myself and write my patch against the modified tree, or just write my patch against head and let the committers figure it out? Joshua D. Drake
"Joshua D. Drake" <jd@commandprompt.com> 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 the value of offering that alternative if it isn't going to be the default. Given that the default will stay the same, I think Peter has covered the useful bases. regards, tom lane
Tom Lane wrote: > "Joshua D. Drake" <jd@commandprompt.com> 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 the value of offering that alternative if it isn't going to be the > default. Given that the default will stay the same, I think Peter has > covered the useful bases. The information presented in the welcome screen is to verbose, but is still useful information. It is surely a cosmetic patch but there was support for the idea. 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} -- One of the things I have found is that the more information you provide someone, the less likely they are to read it. (Every single class I have taught has this problem). I think the above presentation is less bulky, provides essential nutrients and still gets the job done. Sincerely, Joshua D. Drake
"Joshua D. Drake" <jd@commandprompt.com> writes: > My thoughts are to have the initial prompt look something like this: So you're arguing to change the default. regards, tom lane
Tom Lane wrote: > "Joshua D. Drake" <jd@commandprompt.com> 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://archives.postgresql.org/pgsql-hackers/2008-04/msg01255.php http://archives.postgresql.org/pgsql-hackers/2008-04/msg01302.php http://archives.postgresql.org/pgsql-hackers/2008-04/msg01305.php Sincerely, Joshua D. Drake
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 semicolon to launch a query is surprisingly non-obvious to some users. One reason is that it doesn't always work that way in the interactive terminals of other database systems. I think that bit should be kept in the verbose version of the message.
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 use \g or semicolon to launch a query is > surprisingly non-obvious to some users. One reason is that it doesn't always > work that way in the interactive terminals of other database systems. I > think that bit should be kept in the verbose version of the message. Sure. 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 use \g or semicolon to launch a query is > surprisingly non-obvious to some users. One reason is that it doesn't always > work that way in the interactive terminals of other database systems. I > think that bit should be kept in the verbose version of the message. Agreed. \g/; is pretty basic stuff and it seems there is room on the line. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
"Joshua D. Drake" <jd@commandprompt.com> 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 patch, since if the standard help text is cut to one line who's going to bother with "terse" mode? And the "none" mode isn't much of a feature by itself either; people who want that will most likely want -q mode even more. I think we should do one or the other, not both, ie either cut the help text to one line or implement something like Peter's proposal. regards, tom lane
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 > going to bother with "terse" mode? And the "none" mode isn't much of a > feature by itself either; people who want that will most likely want -q > mode even more. 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 and need to know information just because we added a feature to .psqlrc? That seems odd. Sincerely, Joshua D. Drake
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_welcome_message, "terse") == 0)) > ! printf(_("Type: \\copyright for distribution terms\n" > ! " \\h for help with SQL commands\n" > ! " \\? for help with psql commands\n" > ! " \\g or terminate with semicolon to execute query\n" > ! " \\q to quit\n\n")); Hmm, how about: 1. removing the \copyright line 2. removing \h and \? in favor of mentioning the new "help" command So it would look like: Type: "help" to obtain usage information\g or terminate with semicolon to execute query\q to quit -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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_welcome_message && strcmp(var_welcome_message, "terse") == 0)) > > ! printf(_("Type: \\copyright for distribution terms\n" > > ! " \\h for help with SQL commands\n" > > ! " \\? for help with psql commands\n" > > ! " \\g or terminate with semicolon to execute query\n" > > ! " \\q to quit\n\n")); > > Hmm, how about: > > 1. removing the \copyright line > 2. removing \h and \? in favor of mentioning the new "help" command > > So it would look like: > > Type: "help" to obtain usage information > \g or terminate with semicolon to execute query > \q to quit 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 -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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 alone \?. The word "help" is about as plain as day as you can get. Google search for the word help: 3,330,000,000 First result, help.com Google search for the expression \h: 1,800,000,000 First result, Hydrogen Plainly spoken, easily understandable *help* for the masses. :) Sincerely, Joshua D. Drake
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 completely counterintuitive to a "user", > let alone \?. The word "help" is about as plain as day as you can get. > > Google search for the word help: 3,330,000,000 > First result, help.com > Google search for the expression \h: 1,800,000,000 > First result, Hydrogen > > Plainly spoken, easily understandable *help* for the masses. :) 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. How about: \? for psql help, \h for SQL help \g or ';' to execute a query \q to quit -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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. > How about: > > \? for psql help, \h for SQL help > \g or ';' to execute a query > \q to quit -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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 of psql commands and SQL commands. Yes, right now psql help duplicates some things already printed in the header, like \q, so 'help' output would need adjustment. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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 > This would be more in line with our current process sure. However something a little more radical might be cool :) 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 :) Sincerely, 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: - 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: help <Tab> <tab> and it would give back: help [sql | psql] (or something like that) Then if they type: help psql, they get back the current \? If they type help sql they get back the current \h If they don't know what they need, help is the shortest path to find out. If they do know what they need, then we don't need everything else. Sincerely, Joshua D. Drake
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: > \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 :) 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. We can change, of course. ;-) -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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: > > help <Tab> <tab> and it would give back: > > help [sql | psql] (or something like that) > > Then if they type: > > help psql, they get back the current \? > > If they type help sql they get back the current \h > > If they don't know what they need, help is the shortest path to find > out. If they do know what they need, then we don't need everything else. Does Win32 have tab completion? I am wondering if we should lose the tab and just print: help [sql | psql] in the header, again assuming we want to actually have 'help' so something. I am afraid the phrase "tab completion" is too complex for the type of people who need help. :-) -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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 users are *not* using psql. They are using pgadmin. > > help [sql | psql] > > in the header, again assuming we want to actually have 'help' so > something. I am not opposed to the above but it does break conformance with what we do now (syntatically). > I am afraid the phrase "tab completion" is too complex for > the type of people who need help. :-) Yeah maybe. Joshua D. Drake
Bruce Momjian <bruce@momjian.us> 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 idea of reducing the fixed banner to just "Type help for help", and moving all the existing instructions underneath "help", seems fairly sane to me. regards, tom lane
Bruce Momjian <bruce@momjian.us> 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 detail for the banner, and then "help" itself should tell you about the options available. regards, tom lane
"Joshua D. Drake" <jd@commandprompt.com> 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 and need to know information just > because we added a feature to .psqlrc? You missed my point entirely, which is that if we shorten the default banner help to ~1 line then this .psqlrc "feature" isn't going to get added, because it'd be useless. It's only useful given the premise that the default output will continue to be verbose. 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. regards, tom lane
Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> 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 detail > for the banner, and then "help" itself should tell you about the options > available. I am good with that. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
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, I see less use of the .psqlrc and I find it more likely that a shortened default banner would be beneficial. *shrug* Sincerely, Joshua D. Drake
Bruce Momjian wrote: > Tom Lane wrote: >> Bruce Momjian <bruce@momjian.us> 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 detail >> for the banner, and then "help" itself should tell you about the options >> available. > > I am good with that. O.k. so... can I work up a patch for that? Peter do you want to work up a patch (since this started as your idea, before it was morphed?) Sincerely, Joshua D. Drake
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 few other messages I didn't care about and was possibly going to bring up for discussion next. ;-) So in light of that, I withdraw my patch and vote for leaving everything as is.
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 have zero desire to take away from the work > that Peter did. However, I see less use of the .psqlrc and I find it > more likely that a shortened default banner would be beneficial. *shrug* > 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 "none". For more information on the .psqlrc file and it's available options, please see the postgresql documentation". This would provide even more help for newbies, and encourage people to learn about the .psqlrc file. :-) -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
On Sun, 20 Apr 2008 14:25:36 -0400 Robert Treat <xzilla@users.sourceforge.net> 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 "none". For more information on the .psqlrc file and it's > available options, please see the postgresql documentation". > > This would provide even more help for newbies, and encourage people > to learn about the .psqlrc file. :-) > The will just ignore it. Its too much text. I like the help for help idea the best. We could even add a help .psqlrc deal in there with a hint sentence. Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
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 message can be defined in the .psqlrc ? Something along the lines of - WELCOME_MESSAGE="Welcome to <VERS_PSQL> - <VERS_SERVER>\n<SSL_INFO>" (or similar with tags available that will allow predefined info to be inserted) I also see with this path that there could be a configure option to specify the default welcome text, I am thinking three options would keep most happy without adjustment in .psqlrc --default-welcome-message=[classic|short|oneline|"custom string"] "custom string" would match the above setting options - classic would be the default. This could also give the option in .psqlrc of having - WELCOME_MESSAGE=<CLASSIC> From there you can customise the setting to what you want and even across all machines in the office to match company policy (so to speak) setting default .psqlrc file for new users etc. Along that line maybe implement a way to have default welcome message settings per server? psql retrieves the welcome settings upon server connection. (as in psql requests it after connection - not returned with the initial connection request) This would be the default that is overridden by the local .psqlrc file. -- Shane Ambler pgSQL (at) Sheeky (dot) Biz Get Sheeky @ http://Sheeky.Biz
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 <VERS_PSQL> - <VERS_SERVER>\n<SSL_INFO>" This is basically equivalent to \echo Welcome to psql :VERSION blah. You can do most of this already.
Peter Eisentraut <peter_e@gmx.net> 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 <VERS_PSQL> - <VERS_SERVER>\n<SSL_INFO>" > You can do most of this already. It seems rather overdesigned anyway, considering that there's been exactly zero field demand for a customizable banner. The only reason the idea even came up was that Peter proposed a switchable banner as a compromise between different desires. But I think we've pretty much got consensus that everyone is happy with reducing the help text to "type "help" for help", so there's really no need for customizing. regards, tom lane