[Groonga-commit] groonga/groonga at 98d6462 [master] doc column_rename: fix documentation

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Feb 10 11:20:08 JST 2014


Kouhei Sutou	2014-02-10 11:20:08 +0900 (Mon, 10 Feb 2014)

  New Revision: 98d64628d92da28c2ce34b14200f2e645e6899b6
  https://github.com/groonga/groonga/commit/98d64628d92da28c2ce34b14200f2e645e6899b6

  Message:
    doc column_rename: fix documentation
    
    Reported by nise_nabe. Thanks!!!

  Modified files:
    doc/source/reference/commands/column_rename.txt

  Modified: doc/source/reference/commands/column_rename.txt (+34 -13)
===================================================================
--- doc/source/reference/commands/column_rename.txt    2014-02-07 19:26:15 +0900 (e17a10b)
+++ doc/source/reference/commands/column_rename.txt    2014-02-10 11:20:08 +0900 (83fe764)
@@ -11,16 +11,31 @@
 Summary
 -------
 
-``column_rename`` command renames specified column name of table.
+``column_rename`` command renames a column.
+
+It is a light operation. It just changes a relationship between name
+and the column object. It doesn't copy column values.
+
+It is a dangerous operation. You must stop all operations including
+read operations while you run ``column_rename``. If the following case
+is occurred, Groonga process may be crashed:
+
+  * Starts an operation (like ``select``) that accesses the column to
+    be renamed by the current column name. The current column name is
+    called as ``the old column name`` in the below because the column
+    name is renamed.
+  * Runs ``column_rename``. The ``select`` is still running.
+  * The ``select`` accesses the column to be renamed by the old column
+    name. But the ``select`` can't find the column by the old name
+    because the column has been renamed to the new column name. It may
+    crash the Groonga process.
 
 Syntax
 ------
 
-``column_rename`` command takes two parameters.
-
-The required parameter is ``table`` and ``column_name``::
+``column_rename`` command takes three parameters. All parameters are required::
 
-  column_rename table column
+  column_rename table name new_name
 
 Usage
 -----
@@ -46,20 +61,26 @@ Parameters
 
 This section describes parameters of ``column_rename``.
 
-Required parameter
-^^^^^^^^^^^^^^^^^^
+Required parameters
+^^^^^^^^^^^^^^^^^^^
 
-There are required parameters, ``table_name`` and ``column_name``.
+All parameters are required.
 
 ``table_name``
 """"""""""""""
 
-It specifies the name of table.
+It specifies the name of table that has the column to be renamed.
+
+``name``
+""""""""
+
+It specifies the column name to be renamed.
+
+``new_name``
+""""""""""""
 
-``column_name``
-"""""""""""""""
+It specifies the new column name.
 
-It specifies the name of column.
 
 Return value
 ------------
@@ -75,5 +96,5 @@ Return value
 
 ``SUCCEEDED_OR_NOT``
 
-  If command succeeded, it returns true, otherwise it returns false on error.
+  It is ``true`` on success, ``false`` otherwise.
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index