Removal of FORCE option in REINDEX

Started by Fujii Masaoalmost 11 years ago5 messages
#1Fujii Masao
masao.fujii@gmail.com

Hi,

While reviewing the REINDEX VERBOSE patch, I felt inclined to remove FORCE
option support from REINDEX command. It has been marked "obsolete" since
very old version 7.4. I think that it's no longer worth keeping supporting it.
Thought?

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: Fujii Masao (#1)
Re: Removal of FORCE option in REINDEX

Em quarta-feira, 8 de abril de 2015, Fujii Masao <masao.fujii@gmail.com>
escreveu:

Hi,

While reviewing the REINDEX VERBOSE patch, I felt inclined to remove FORCE
option support from REINDEX command. It has been marked "obsolete" since
very old version 7.4. I think that it's no longer worth keeping supporting
it.
Thought?

+1

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL

Show quoted text

Timbira: http://www.timbira.com.br
Blog: http://fabriziomello.github.io
Linkedin: http://br.linkedin.com/in/fabriziomello
Twitter: http://twitter.com/fabriziomello
Github: http://github.com/fabriziomello

#3Fujii Masao
masao.fujii@gmail.com
In reply to: Fabrízio de Royes Mello (#2)
1 attachment(s)
Re: Removal of FORCE option in REINDEX

On Wed, Apr 8, 2015 at 1:17 PM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:

Em quarta-feira, 8 de abril de 2015, Fujii Masao <masao.fujii@gmail.com>
escreveu:

Hi,

While reviewing the REINDEX VERBOSE patch, I felt inclined to remove FORCE
option support from REINDEX command. It has been marked "obsolete" since
very old version 7.4. I think that it's no longer worth keeping supporting
it.
Thought?

+1

I'm thinking to apply the attached patch.
But does anyone want to keep supporting the option? Why?

Regards,

--
Fujii Masao

Attachments:

remove_force_option_from_reindex_syntax_v1.patchtext/x-patch; charset=US-ASCII; name=remove_force_option_from_reindex_syntax_v1.patchDownload
*** a/doc/src/sgml/ref/reindex.sgml
--- b/doc/src/sgml/ref/reindex.sgml
***************
*** 21,27 **** PostgreSQL documentation
  
   <refsynopsisdiv>
  <synopsis>
! REINDEX { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replaceable class="PARAMETER">name</replaceable> [ FORCE ]
  </synopsis>
   </refsynopsisdiv>
  
--- 21,27 ----
  
   <refsynopsisdiv>
  <synopsis>
! REINDEX { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replaceable class="PARAMETER">name</replaceable>
  </synopsis>
   </refsynopsisdiv>
  
***************
*** 150,164 **** REINDEX { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replaceable class="PARAM
       </para>
      </listitem>
     </varlistentry>
- 
-    <varlistentry>
-     <term><literal>FORCE</literal></term>
-     <listitem>
-      <para>
-       This is an obsolete option; it is ignored if specified.
-      </para>
-     </listitem>
-    </varlistentry>
    </variablelist>
   </refsect1>
  
--- 150,155 ----
*** a/src/backend/parser/gram.y
--- b/src/backend/parser/gram.y
***************
*** 7301,7313 **** opt_if_exists: IF_P EXISTS						{ $$ = TRUE; }
   *
   *		QUERY:
   *
!  *		REINDEX type <name> [FORCE]
!  *
!  * FORCE no longer does anything, but we accept it for backwards compatibility
   *****************************************************************************/
  
  ReindexStmt:
! 			REINDEX INDEX qualified_name opt_force
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_INDEX;
--- 7301,7311 ----
   *
   *		QUERY:
   *
!  *		REINDEX type <name>
   *****************************************************************************/
  
  ReindexStmt:
! 			REINDEX INDEX qualified_name
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_INDEX;
***************
*** 7315,7321 **** ReindexStmt:
  					n->name = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX TABLE qualified_name opt_force
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_TABLE;
--- 7313,7319 ----
  					n->name = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX TABLE qualified_name
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_TABLE;
***************
*** 7323,7329 **** ReindexStmt:
  					n->name = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX SCHEMA name opt_force
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_SCHEMA;
--- 7321,7327 ----
  					n->name = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX SCHEMA name
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_SCHEMA;
***************
*** 7331,7337 **** ReindexStmt:
  					n->relation = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX SYSTEM_P name opt_force
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_SYSTEM;
--- 7329,7335 ----
  					n->relation = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX SYSTEM_P name
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_SYSTEM;
***************
*** 7339,7345 **** ReindexStmt:
  					n->relation = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX DATABASE name opt_force
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_DATABASE;
--- 7337,7343 ----
  					n->relation = NULL;
  					$$ = (Node *)n;
  				}
! 			| REINDEX DATABASE name
  				{
  					ReindexStmt *n = makeNode(ReindexStmt);
  					n->kind = REINDEX_OBJECT_DATABASE;
***************
*** 7349,7358 **** ReindexStmt:
  				}
  		;
  
- opt_force:	FORCE									{  $$ = TRUE; }
- 			| /* EMPTY */							{  $$ = FALSE; }
- 		;
- 
  
  /*****************************************************************************
   *
--- 7347,7352 ----
#4Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Fujii Masao (#3)
Re: Removal of FORCE option in REINDEX

On 4/8/15 7:04 AM, Fujii Masao wrote:

I'm thinking to apply the attached patch.
But does anyone want to keep supporting the option? Why?

Nuke it.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Fujii Masao
masao.fujii@gmail.com
In reply to: Jim Nasby (#4)
Re: Removal of FORCE option in REINDEX

On Thu, Apr 9, 2015 at 12:33 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:

On 4/8/15 7:04 AM, Fujii Masao wrote:

I'm thinking to apply the attached patch.
But does anyone want to keep supporting the option? Why?

Nuke it.

There seem no objections, so just pushed.

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers