Unix Technical Forum

RESET command seems pretty disjointed now

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 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 08:18 AM
Tom Lane
 
Posts: n/a
Default RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 08:18 AM
Mark Kirkwood
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 08:19 AM
Tom Lane
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 08:19 AM
Florian G. Pflug
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 08:19 AM
Tom Lane
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-12-2008, 08:19 AM
Marko Kreen
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-12-2008, 08:20 AM
Florian Pflug
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-12-2008, 08:24 AM
Neil Conway
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-12-2008, 08:26 AM
Neil Conway
 
Posts: n/a
Default Re: RESET command seems pretty disjointed now

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com