This is a discussion on Patch to change psql default banner within the Pgsql Patches forums, part of the PostgreSQL category; --> On Thu, May 15, 2008 at 06:57:12PM -0400, Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: > > David ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Thu, May 15, 2008 at 06:57:12PM -0400, Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> 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 think you must have been out in the sun too long. > > Hey, he's welcome to try to do it. But it's utterly unrelated to > the patch at hand, and we are not holding up the patch at hand until > something like that happens. Nor am I suggesting holding up this patch for that reason Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| 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 version of Postgres >>> at the time of their release, so 8.4's psql would be able to talk >>> seamlessly to Postgres 7.4 >>> >> I think you must have been out in the sun too long. >> > > One thing I really treasure about working on the Postgres project is > frank feedback. > I know you know me well enough to realise there was an implied smiley ;-) > >> Just look at the pg_dump code if you want something of an idea of >> what this would involve. >> > > Given that each previous version tied backslash commands to some > particular chunk of SQL, what would be the problem with either > immediately or lazily setting those to the chunks of SQL already > present in previous versions? > > > First, this is not a cost free exercise - it increases code complexity enormously. Second, it's not nearly as easy as that: .. new commands have been added .. postgres features have been added .. catalogs have changed Among other things, help and indeed the available command set would have to become server version sensitive. And you would greatly increase the bar for anyone wanting to add a new command - now they (or someone) would have to work out how the command would or might work n versions back, not just with the current dev version. Doing it lazily isn't acceptable - if we promise \command compatibility with previous server versions then we need to deliver it to the maximum extent possible, and if we don't promise it there's no point in doing this. And, as Tom says, it has nothing really to do with this patch. cheers andrew -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| 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 that's tremendously different. The nice thing about most \X commands is that they embed everything they need in a bunch of SQL, and they don't need much else in C code. So it's not all that difficult. 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 would be OK to punt on that. We already stopped supporting 7.2 anyway. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| 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 version, right? It's not like that's > tremendously different. The nice thing about most \X commands is that > they embed everything they need in a bunch of SQL, and they don't need > much else in C code. So it's not all that difficult. > > 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 would be OK to punt on that. We already > stopped supporting 7.2 anyway. > Have at it then. Prove me wrong. cheers andrew -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| "Joshua D. Drake" <jd@commandprompt.com> 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 done it yet, that would seem to be the consensus opinion :-) Still, it'd be interesting to see an attempt at making it go. The costs of doing it now for existing versions would probably give us a good idea of what the future maintenance effort might be like. Without a real patch to look at, we're all just guessing about that. regards, tom lane -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| 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 would be OK to punt on that. We already >> stopped supporting 7.2 anyway. >> > > 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. Sincerely, Joshua D. Drake -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| On Fri, May 16, 2008 at 01:22:55AM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> 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 investigation, but blaming > the patch-at-hand for the issue is just misleading. The patch at hand, as you point out, emphasizes a problem that's been there all along, namely that \c doesn't do the same things that command line connection does. I'm volunteering to make them use the same methods Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| David Fetter <david@fetter.org> 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 investigation, but blaming the patch-at-hand for the issue is just misleading. regards, tom lane -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| |||
| 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 example that shows both SSL and Win32 code page messages: 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. This is a pretty clear POLA violation, IMHO. On my laptop, I have two pg instances running: 8.3.0 on port 5432, CVS TIP on 2225. Here's what I get if I invoke psql from the command line: $ psql -p 5432 postgres Welcome to psql 8.4devel (server 8.3.0), 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 WARNING: You are connected to a server with major version 8.3, but your psql client is major version 8.4. Some backslash commands, such as \d, might not work properly. Here's what I get if I use \c, having connected to CVS TIP first: davidfetter@postgres=# \c - - - 5432 You are now connected to database "postgres" at port "5432". I think that the warning should be consistently there on connect instead of just at program start. Not coincidentally, moving all the checks into one spot, i.e. making startup.c and command.c call and test the same things to connect to a database, advances my Evil Plan™ to make more interesting things happen when switching versions Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |
| ||||
| 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) > 8-bit characters might not work correctly. See psql reference > page "Notes for Windows users" for details. > SSL connection (cipher: 55, bits: 512) > Type "help" for help. > > test=> > Updated patch applied, docs adjusted for new psql startup banner. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches |