Обсуждение: Re: [GENERAL] Making sure \timing is on
On Tue, May 13, 2008 at 10:47:40AM -0400, Alvaro Herrera wrote: > Tom Lane escribió: > > Alvaro Herrera <alvherre@commandprompt.com> writes: > > > David Fetter escribi?: > > >> Thanks for the heads-up :) > > >> > > >> Second patch attached, this time with some docs. > > > > > Added to July commitfest. > > > > Surely this is merely proof of concept and not a complete patch. > > David, ya heard da man :-) Next patch attached :) Cheers, David (free() the malloc()s!) -- 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
On Tue, May 13, 2008 at 08:14:51AM -0700, David Fetter wrote: > On Tue, May 13, 2008 at 10:47:40AM -0400, Alvaro Herrera wrote: > > Tom Lane escribió: > > > Alvaro Herrera <alvherre@commandprompt.com> writes: > > > > David Fetter escribi?: > > > >> Thanks for the heads-up :) > > > >> > > > >> Second patch attached, this time with some docs. > > > > > > > Added to July commitfest. > > > > > > Surely this is merely proof of concept and not a complete patch. > > > > David, ya heard da man :-) > > Next patch attached :) > > Cheers, > David (free() the malloc()s!) *Sigh* This time with the patch actually attached :P 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
Вложения
David Fetter <david@fetter.org> writes: >>> Surely this is merely proof of concept and not a complete patch. >> >> Next patch attached :) Uh, my point was that the agreement was to do this to *all* of psql's toggling backslash commands, not only \timing. regards, tom lane
On Tue, May 13, 2008 at 11:36:57AM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> writes: > >>> Surely this is merely proof of concept and not a complete patch. > >> > >> Next patch attached :) > > Uh, my point was that the agreement was to do this to *all* of > psql's toggling backslash commands, not only \timing. Done :) 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
Вложения
On Tue, May 13, 2008 at 01:53:33PM -0700, David Fetter wrote: > On Tue, May 13, 2008 at 11:36:57AM -0400, Tom Lane wrote: > > David Fetter <david@fetter.org> writes: > > >>> Surely this is merely proof of concept and not a complete patch. > > >> > > >> Next patch attached :) > > > > Uh, my point was that the agreement was to do this to *all* of > > psql's toggling backslash commands, not only \timing. > > Done :) Ugh. This time with the correct patch attached :P Cheers, David (not having much luck with attachments) -- 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
Вложения
David Fetter <david@fetter.org> writes: > On Tue, May 13, 2008 at 11:36:57AM -0400, Tom Lane wrote: >>> Uh, my point was that the agreement was to do this to *all* of >>> psql's toggling backslash commands, not only \timing. >> >> Done :) Hmm, I thought we had a lot more than three that were like this. But on looking closer, I guess all the other ones are \pset boolean options that already behave properly. Actually, \a and \H are fairly bogus anyway, because they are "toggling" a setting that has more than two values. I wonder whether defining the argument as a boolean is really very sane. Perhaps it would be better to take the argument if given as just a regular format setting --- ie, with an argument, either of these would just be a shorthand for \pset format. regards, tom lane
Tom Lane escribió: > Actually, \a and \H are fairly bogus anyway, because they are "toggling" > a setting that has more than two values. I wonder whether defining the > argument as a boolean is really very sane. Perhaps it would be better to > take the argument if given as just a regular format setting --- ie, > with an argument, either of these would just be a shorthand for > \pset format. Agreed -- they are bogus. However, making "\H aligned" be an alias for "\pset format aligned" does not look very sane either (is that "html aligned" or what?) Seeing how these have been deprecated for a very long while, perhaps the thing to do is leave their behavior alone and throw a warning when they are used; in a couple more releases, remove them. However this isn't very sane either, because we'd break scripts that are using \H for no good reason. Another thing we could do is keep them as "toggles", but instead of aligned/HTML and aligned/unaligned, make them remember the state that was set at the time they were called, and toggle between HTML (or aligned) and the last state. ... except that since aligned is the default mode, \a should not toggle between last state and aligned, but rather between last state and unaligned. Which makes it a misnomer. Or maybe the thing to do is leave them damn well alone and just fix \timing. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.