Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-26 Thread Bruce Momjian

Patch applied from Neil.

---

Marko Kreen wrote:
> On 4/23/07, Neil Conway <[EMAIL PROTECTED]> wrote:
> > 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.
> 
> Attached patch addresses all 3 comments.  As it will be
> top-level command, I put code into commands/discard.c
> 
> -- 
> marko

[ Attachment, skipping... ]

> 
> ---(end of broadcast)---
> TIP 2: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>  http://momjian.us
  EnterpriseDB   http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-26 Thread Neil Conway
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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-24 Thread Marko Kreen

On 4/23/07, Neil Conway <[EMAIL PROTECTED]> wrote:

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.


Attached patch addresses all 3 comments.  As it will be
top-level command, I put code into commands/discard.c

--
marko


discard_v2.diff.gz
Description: GNU Zip compressed data

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-23 Thread Neil Conway
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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-17 Thread Florian Pflug

Tom Lane wrote:

Mark Kirkwood <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-17 Thread Marko Kreen

On 4/17/07, Marko Kreen <[EMAIL PROTECTED]> wrote:

If DISCARD is the final word, I start to prepare a patch.


Attached patch does following conversions:

RESET PLANS -> DISCARD PLANS
RESET TEMP -> DISCARD TEMP
RESET SESSION -> DISCARD ALL

--
marko


discard.diff.gz
Description: GNU Zip compressed data

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-17 Thread Marko Kreen

On 4/17/07, Tom Lane <[EMAIL PROTECTED]> wrote:

Florian Pflug <[EMAIL PROTECTED]> 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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-16 Thread Tom Lane
Florian Pflug <[EMAIL PROTECTED]> 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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-16 Thread Florian G. Pflug

Tom Lane wrote:

Mark Kirkwood <[EMAIL PROTECTED]> 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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-16 Thread Tom Lane
Mark Kirkwood <[EMAIL PROTECTED]> 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


Re: [HACKERS] RESET command seems pretty disjointed now

2007-04-15 Thread Mark Kirkwood

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 [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[HACKERS] RESET command seems pretty disjointed now

2007-04-15 Thread Tom Lane
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