Re: [PATCHES] Patch to change psql default banner v6

2008-07-02 Thread Tom Lane
Guillaume Lelarge [EMAIL PROTECTED] writes: Attached is a new version of the patch. It fixes a few issues when one adds a pattern to metacommands. Applied with some editorialization. There were some places you evidently hadn't tested against all supported server versions ...

Re: [PATCHES] Patch to change psql default banner v6

2008-06-30 Thread Bruce Momjian
David Fetter wrote: On Fri, May 16, 2008 at 01:22:55AM -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: I believe there's a bug in this patch, namely that the warnings when there's a server-client mismatch only appear at startup time. Please do not blame this patch for a

Re: [PATCHES] Patch to change psql default banner v6

2008-05-20 Thread Bryce Nesbitt
Guillaume Lelarge wrote: Here is a patch that tries to implement this. Meta-commands should work from 7.4 to 8.4-devel releases. It was not hard to do, and I don't think it really is a burden to maintain. One part left to fix is \du and \dg commands. I would be glad to continue to work on

Re: [PATCHES] Patch to change psql default banner v6

2008-05-20 Thread Guillaume Lelarge
Bryce Nesbitt a écrit : Guillaume Lelarge wrote: Here is a patch that tries to implement this. Meta-commands should work from 7.4 to 8.4-devel releases. It was not hard to do, and I don't think it really is a burden to maintain. One part left to fix is \du and \dg commands. I would be glad

Re: [PATCHES] Patch to change psql default banner v6

2008-05-19 Thread Guillaume Lelarge
Tom Lane a écrit : Joshua D. Drake [EMAIL PROTECTED] writes: Andrew Dunstan wrote: Have at it then. Prove me wrong. IMO the problem isn't the one off support for all supported version of Pg... say 7.4 - 8.4. The problem is of on going maintenance. /me doesn't think it is worth the

Re: [PATCHES] Patch to change psql default banner v6

2008-05-16 Thread David Fetter
On Fri, May 16, 2008 at 01:22:55AM -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: I believe there's a bug in this patch, namely that the warnings when there's a server-client mismatch only appear at startup time. Please do not blame this patch for a problem that has been

Re: [PATCHES] Patch to change psql default banner v6

2008-05-16 Thread Tom Lane
David Fetter [EMAIL PROTECTED] writes: I believe there's a bug in this patch, namely that the warnings when there's a server-client mismatch only appear at startup time. Please do not blame this patch for a problem that has been there all along. I don't say that the point doesn't need

Re: [PATCHES] Patch to change psql default banner v6

2008-05-16 Thread David Fetter
On Thu, May 15, 2008 at 03:21:37PM -0400, Bruce Momjian wrote: Alvaro Herrera wrote: I'm OK with thisG but please move the printSSLInfo() call just before echoing the help line. Oh, good catch, moved. I also moved the Win32 code page message up too. Patch attached. I hacked up an

Re: [PATCHES] Patch to change psql default banner v6

2008-05-16 Thread Bruce Momjian
Bruce Momjian wrote: OK, here is the mega-print: $ psql test psql (8.4devel, server 8.4devel) WARNING: psql version 8.4, server version 8.4. Some psql features might not work. WARNING: Console code page (44) differs from Windows code page (55)

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Ah, OK. I had forgotten. Here is the new output: $ sql test psql (8.4devel) Type help for help. test= help You are being unreasonably cryptic here. What happens when there is optional output --- ie, version mismatch

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Ah, OK. I had forgotten. Here is the new output: $ sql test psql (8.4devel) Type help for help. test= help You are being unreasonably cryptic here. What happens when there is optional output --- ie,

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Oh, good point. Let me look at that. Thanks. You prefer: $ sql test psql (8.4devel) Type help for help. test= help Well, the question is still where is the optional info going to go? I think what I'd find nice looking is

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Joshua D. Drake
Tom Lane wrote: Well, the question is still where is the optional info going to go? I think what I'd find nice looking is $ psql test psql 8.4devel [ server version warning here, if needed ] [ line with SSL info here, if needed ] Type help for help. test=

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
Joshua D. Drake wrote: O.k. I am not trying to start an argument here but... I already sent 6 revisions of this patch that received comments and had thorough review via Alvaro. I even took into account Tom's original comments from the previous thread. This much effort on something so

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Andrew Dunstan
Joshua D. Drake wrote: O.k. I am not trying to start an argument here but... I already sent 6 revisions of this patch that received comments and had thorough review via Alvaro. I even took into account Tom's original comments from the previous thread. This much effort on something so

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Joshua D. Drake
On Thu, 15 May 2008 11:46:41 -0400 (EDT) Bruce Momjian [EMAIL PROTECTED] wrote: Bruce with respect the only useful thing I have seen you do to the patch in all this wrangling is realign the \? General options and frankly even that is suspect in my opinion. Can we either throw it away and

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Alvaro Herrera
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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Oh, good point. Let me look at that. Thanks. You prefer: $ sql test psql (8.4devel) Type help for help. test= help Well, the question is still where is the optional info going to go? I think what I'd

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Ron Mayer
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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Ron Mayer wrote: 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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Alvaro Herrera
I'm OK with thisG but please move the printSSLInfo() call just before echoing the help line. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
Alvaro Herrera wrote: I'm OK with thisG but please move the printSSLInfo() call just before echoing the help line. Oh, good catch, moved. I also moved the Win32 code page message up too. Patch attached. I hacked up an example that shows both SSL and Win32 code page messages: $ psql

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: With major version mismatches it looks like this: $ psql test psql (8.4devel) SSL connection (cipher: 2343, bits: 512) WARNING: Console code page (323) differs from Windows code page (2323)

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: With major version mismatches it looks like this: $ psql test psql (8.4devel) SSL connection (cipher: 2343, bits: 512) WARNING: Console code page (323) differs from Windows code page (2323)

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread daveg
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),

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Bruce Momjian
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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread David Fetter
On Thu, May 15, 2008 at 12:09:25PM -0400, 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

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Gregory Stark
Alvaro Herrera [EMAIL PROTECTED] writes: Bruce Momjian wrote: I know we decided not to do that, but I am trying to figure out what the goal if 'help' is? To display the most frequently-used help commands? Aren't they at the top of \?. The purpose of 'help' is to provide useful help. If

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Andrew Dunstan
David Fetter wrote: I hate to bike-shed this even further, but I'd like to make those incompatibility messages just go away by making 8.4's psql (and all those going forward) support every living version of Postgres at the time of their release, so 8.4's psql would be able to talk seamlessly

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: David Fetter wrote: I hate to bike-shed this even further, but I'd like to make those incompatibility messages just go away by making 8.4's psql (and all those going forward) support every living version of Postgres at the time of their release, I

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread David Fetter
On Thu, May 15, 2008 at 06:55:31PM -0400, Andrew Dunstan wrote: David Fetter wrote: I hate to bike-shed this even further, but I'd like to make those incompatibility messages just go away by making 8.4's psql (and all those going forward) support every living version of Postgres at the time

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread David Fetter
On Thu, May 15, 2008 at 06:57:12PM -0400, Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: David Fetter wrote: I hate to bike-shed this even further, but I'd like to make those incompatibility messages just go away by making 8.4's psql (and all those going forward) support every

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Andrew Dunstan
David Fetter wrote: On Thu, May 15, 2008 at 06:55:31PM -0400, Andrew Dunstan wrote: David Fetter wrote: I hate to bike-shed this even further, but I'd like to make those incompatibility messages just go away by making 8.4's psql (and all those going forward) support every living

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Alvaro Herrera
Andrew Dunstan wrote: Second, it's not nearly as easy as that: . new commands have been added . postgres features have been added . catalogs have changed Well, this just means a different piece of SQL needs to be sent for a command depending on the server version, right? It's not like

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: Second, it's not nearly as easy as that: . new commands have been added . postgres features have been added . catalogs have changed Well, this just means a different piece of SQL needs to be sent for a command depending on the server

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Andrew Dunstan wrote: Have at it then. Prove me wrong. IMO the problem isn't the one off support for all supported version of Pg... say 7.4 - 8.4. The problem is of on going maintenance. /me doesn't think it is worth the effort. Since no one's

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Joshua D. Drake
Andrew Dunstan wrote: And for commands that have been added later, an initial version could just say this server version does not support this command. It would be already a huge improvement. Probably the biggest change would be to support versions that did not have schemas, but I think it

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Joshua D. Drake wrote: On Wed, 23 Apr 2008 14:41:20 -0700 Joshua D. Drake [EMAIL PROTECTED] wrote: Hello, Per final discussion here: http://archives.postgresql.org/pgsql-hackers/2008-04/msg01607.php I have looked over this patch and made a few adjustments. You used for a help startup

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
I think that consistency will be clearer. In the past we were trying to avoid \?, but I think now it is clean enough to be used by new people without confusion. I also put the version number in parentheses so it wouldn't be as prominent. Updated patch attached. FYI, after the patch is

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Alvaro Herrera
Bruce Momjian wrote: If you type 'help' it just repeats the startup banner suggestion: test= help You are using psql, the command-line interface to PostgreSQL. Type \? for help. I think we wanted to have more information in 'help', not less. Making it just repeat

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: If you type 'help' it just repeats the startup banner suggestion: test= help You are using psql, the command-line interface to PostgreSQL. Type \? for help. I think we wanted to have more information in 'help', not

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Joshua D. Drake
Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: If you type 'help' it just repeats the startup banner suggestion: test= help You are using psql, the command-line interface to PostgreSQL. Type \? for help. I think we wanted to have more

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Alvaro Herrera
Bruce Momjian wrote: I know we decided not to do that, but I am trying to figure out what the goal if 'help' is? To display the most frequently-used help commands? Aren't they at the top of \?. The purpose of 'help' is to provide useful help. If it only says see \? then it's just

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: I know we decided not to do that, but I am trying to figure out what the goal if 'help' is? To display the most frequently-used help commands? Aren't they at the top of \?. The purpose of 'help' is to provide useful help. If it only says

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Alvaro Herrera
Bruce Momjian wrote: My question is whether we agreed that suggesting help as the best way to get help was what we agreed upon? If we did, I forgot. I thought the 'help' ideas was just for people who forgot the help commands. Please review the previous discussion:

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: My question is whether we agreed that suggesting help as the best way to get help was what we agreed upon? If we did, I forgot. I thought the 'help' ideas was just for people who forgot the help commands. Please review the previous

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Joshua D. Drake
Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: My question is whether we agreed that suggesting help as the best way to get help was what we agreed upon? If we did, I forgot. I thought the 'help' ideas was just for people who forgot the help commands. Please review the

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Joshua D. Drake wrote: Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: My question is whether we agreed that suggesting help as the best way to get help was what we agreed upon? If we did, I forgot. I thought the 'help' ideas was just for people who forgot the help

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Joshua D. Drake
Bruce Momjian wrote: test= \? General \copyright show PostgreSQL usage and distribution terms \g [FILE] or ; send query buffer to server (and results to file or |pipe) \h [NAME] help on syntax of SQL commands, * for all commands

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Bruce Momjian
Joshua D. Drake wrote: Bruce Momjian wrote: test= \? General \copyright show PostgreSQL usage and distribution terms \g [FILE] or ; send query buffer to server (and results to file or |pipe) \h [NAME] help on syntax of SQL commands, * for

Re: [PATCHES] Patch to change psql default banner v6

2008-05-14 Thread Joshua D. Drake
Bruce Momjian wrote: Joshua D. Drake wrote: Bruce Momjian wrote: I moved '\g' up into the General section rather than make it a single-entry section. send query buffer to server means nothing to a newbie. You execute queries, you don't send buffers (from a user perspective). Yep, good,

Re: [PATCHES] Patch to change psql default banner v6

2008-04-23 Thread Joshua D. Drake
On Wed, 23 Apr 2008 14:41:20 -0700 Joshua D. Drake [EMAIL PROTECTED] wrote: Hello, Per final discussion here: http://archives.postgresql.org/pgsql-hackers/2008-04/msg01607.php Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community

Re: [PATCHES] Patch to change psql default banner v6

2008-04-23 Thread Bruce Momjian
Joshua D. Drake wrote: On Wed, 23 Apr 2008 14:41:20 -0700 Joshua D. Drake [EMAIL PROTECTED] wrote: Hello, Per final discussion here: http://archives.postgresql.org/pgsql-hackers/2008-04/msg01607.php Isn't this going to mean \g is listed twice? + fprintf(output,