This is a discussion on RESET command seems pretty disjointed now within the pgsql Hackers forums, part of the PostgreSQL category; --> The current documentation for RESET exhibits a certain lack of, um, intellectual cohesiveness: Name RESET -- restore the value ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| The current documentation for RESET exhibits a certain lack of, um, intellectual cohesiveness: Name RESET -- restore the value of a run-time parameter to the default value Synopsis RESET configuration_parameter RESET ALL RESET { PLANS | SESSION | TEMP | TEMPORARY } That one-line summary has got approximately zip to do with the newly added options; as does most of the Description section. At the very least this manual page needs an extensive rewrite. But I wonder whether the real problem isn't that we chose a bad name for the new commands. Is there another keyword we could use instead of RESET? A concrete objection to the current state of affairs is that absolutely anyone, looking at this set of options with no prior knowledge of PG, would expect that RESET ALL subsumes all the other cases. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Tom Lane wrote: > The current documentation for RESET exhibits a certain lack of, um, > intellectual cohesiveness: > > Name > > RESET -- restore the value of a run-time parameter to the default value > > Synopsis > > RESET configuration_parameter > RESET ALL > RESET { PLANS | SESSION | TEMP | TEMPORARY } > > > That one-line summary has got approximately zip to do with the newly > added options; as does most of the Description section. At the very > least this manual page needs an extensive rewrite. But I wonder whether > the real problem isn't that we chose a bad name for the new commands. > Is there another keyword we could use instead of RESET? A concrete > objection to the current state of affairs is that absolutely anyone, > looking at this set of options with no prior knowledge of PG, would > expect that RESET ALL subsumes all the other cases. Maybe DISCARD for the plans etc might be more intuitive than extending RESET? Mark ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| Mark Kirkwood <markir@paradise.net.nz> writes: > Tom Lane wrote: >> The current documentation for RESET exhibits a certain lack of, um, >> intellectual cohesiveness: >> >> Synopsis >> >> RESET configuration_parameter >> RESET ALL >> RESET { PLANS | SESSION | TEMP | TEMPORARY } > Maybe DISCARD for the plans etc might be more intuitive than extending > RESET? DISCARD PLANS and DISCARD TEMP seem pretty reasonable, but DISCARD SESSION sounds a bit odd --- it seems like it might mean "disconnect", which of course is exactly what we're trying to avoid. But possibly we could rename RESET SESSION as DISCARD ALL. Leastwise I haven't got any better ideas. Anyone have another proposal? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Tom Lane wrote: > Mark Kirkwood <markir@paradise.net.nz> writes: >> Tom Lane wrote: >>> The current documentation for RESET exhibits a certain lack of, um, >>> intellectual cohesiveness: >>> >>> Synopsis >>> >>> RESET configuration_parameter >>> RESET ALL >>> RESET { PLANS | SESSION | TEMP | TEMPORARY } > >> Maybe DISCARD for the plans etc might be more intuitive than extending >> RESET? > > DISCARD PLANS and DISCARD TEMP seem pretty reasonable, but DISCARD SESSION > sounds a bit odd --- it seems like it might mean "disconnect", which of > course is exactly what we're trying to avoid. But possibly we could > rename RESET SESSION as DISCARD ALL. > > Leastwise I haven't got any better ideas. Anyone have another proposal? What about RESET parameter RESET { PLANS | TEMP | TEMPORARY } RESET ALL { PARAMETERS | STATE } RESET ALL would become an abbreviation of RESET ALL PARAMETERS (for backwards compatibility), while RESET SESSION would be renamed to RESET ALL STATE. greetings, Florian Pflug ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Florian Pflug <fgp.phlo.org@gmail.com> writes: > Tom Lane wrote: >>> The current documentation for RESET exhibits a certain lack of, um, >>> intellectual cohesiveness: > What about > RESET parameter > RESET { PLANS | TEMP | TEMPORARY } > RESET ALL { PARAMETERS | STATE } > RESET ALL would become an abbreviation of RESET ALL PARAMETERS (for backwards > compatibility), while RESET SESSION would be renamed to RESET ALL STATE. This doesn't do anything to address the lack of coherence. It's not only that backward compatibility forces us to break the clear meaning of ALL; another problem is that we break the symmetry between SET, RESET, and SHOW. If you can RESET SESSION, what does it mean to SET SESSION? Or SHOW SESSION? Given the precedent that RESET ALL only resets GUC variables, I think it's probably best if we just say that RESET only affects GUC variables, period. The new functionality should go by another name entirely. I'm not wedded to DISCARD by any means, but I do not believe that changing some words after RESET is going to fix my complaint. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| On 4/17/07, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Florian Pflug <fgp.phlo.org@gmail.com> writes: > > Tom Lane wrote: > >>> The current documentation for RESET exhibits a certain lack of, um, > >>> intellectual cohesiveness: > > > What about > > RESET parameter > > RESET { PLANS | TEMP | TEMPORARY } > > RESET ALL { PARAMETERS | STATE } > > > RESET ALL would become an abbreviation of RESET ALL PARAMETERS (for backwards > > compatibility), while RESET SESSION would be renamed to RESET ALL STATE. > > This doesn't do anything to address the lack of coherence. It's not > only that backward compatibility forces us to break the clear meaning of > ALL; another problem is that we break the symmetry between SET, RESET, > and SHOW. If you can RESET SESSION, what does it mean to SET SESSION? > Or SHOW SESSION? > > Given the precedent that RESET ALL only resets GUC variables, I think > it's probably best if we just say that RESET only affects GUC variables, > period. The new functionality should go by another name entirely. > I'm not wedded to DISCARD by any means, but I do not believe that > changing some words after RESET is going to fix my complaint. Can't argue with that. Also I don't have better proposals. If DISCARD is the final word, I start to prepare a patch. -- marko ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| |||
| Tom Lane wrote: > Mark Kirkwood <markir@paradise.net.nz> writes: >> Tom Lane wrote: >>> The current documentation for RESET exhibits a certain lack of, um, >>> intellectual cohesiveness: >>> >>> Synopsis >>> >>> RESET configuration_parameter >>> RESET ALL >>> RESET { PLANS | SESSION | TEMP | TEMPORARY } > >> Maybe DISCARD for the plans etc might be more intuitive than extending >> RESET? > > DISCARD PLANS and DISCARD TEMP seem pretty reasonable, but DISCARD SESSION > sounds a bit odd --- it seems like it might mean "disconnect", which of > course is exactly what we're trying to avoid. But possibly we could > rename RESET SESSION as DISCARD ALL. > > Leastwise I haven't got any better ideas. Anyone have another proposal? What about RESET parameter RESET { PLANS | TEMP | TEMPORARY } RESET ALL { PARAMETERS | STATE } RESET ALL would become an abbreviation of RESET ALL PARAMETERS (for backwards compatibility), while RESET SESSION would be renamed to RESET ALL STATE. greetings, Florian Pflug ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| On Tue, 2007-04-17 at 16:34 +0300, Marko Kreen wrote: > Attached patch does following conversions: ISTM it would be cleaner to use an enum to identify the different variants of the DISCARD command, rather than a character string. Is guc.c still the logical place for the implementation of DISCARD? Something under backend/commands might be better, although I don't see a real obvious place for it. The psql tab completion code requires updating for the new DISCARD command. -Neil ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| ||||
| On Tue, 2007-04-24 at 18:04 +0300, Marko Kreen wrote: > Attached patch addresses all 3 comments. As it will be > top-level command, I put code into commands/discard.c Applied with some minor tweaks -- thanks for the patch. I didn't bother moving the regression tests out of guc.sql, although they don't really belong there any longer. -Neil ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| Thread Tools | |
| Display Modes | |
|
|