pgadmin4/docs/en_US/move_objects.rst

66 lines
2.3 KiB
ReStructuredText
Raw Normal View History

2016-06-16 02:55:29 -05:00
.. _move_objects:
2018-06-15 03:14:12 -05:00
****************************
`Move Objects Dialog`:index:
****************************
2016-06-16 02:55:29 -05:00
Use the *Move Objects* dialog to to move database objects from one tablespace to
another tablespace.
2016-06-16 02:55:29 -05:00
The *Move Objects* dialog organizes the movement of database objects with the
*General* tab; the *SQL* tab displays the SQL code generated by dialog
selections.
2016-06-16 02:55:29 -05:00
.. image:: images/move_objects_general.png
:alt: Move objects dialog general tab
:align: center
2016-06-16 02:55:29 -05:00
Use the fields in the *General* tab to identify the items that will be moved and
the tablespace to which they will be moved:
2016-06-16 02:55:29 -05:00
* Use the *New tablespace* drop-down listbox to select a pre-existing
tablespace to which the object will be moved. (To create a tablespace, use the
*Tablespace* dialog; access the dialog by right clicking *Tablespaces* in the
*pgAdmin* tree control and selecting *Create Tablespace...* from the
context-menu.)
2016-06-16 02:55:29 -05:00
* Use the *Object type* drop-down listbox to select from the following:
* Select *All* to move all tables, indexes, and materialized views from the
current tablespace (currently selected in the *pgAdmin* tree control) to
the new tablespace.
* Select *Tables* to move tables from the current tablespace to the new
tablespace.
* Select *Indexes* to move indexes from the current tablespace to the new
tablespace.
* Select *Materialized views* to move materialized views from the current
tablespace to the new tablespace.
* Use the *Object owner* drop-down listbox to select the role that owns the
objects selected in the *Object type* field. This field is optional.
2016-06-16 02:55:29 -05:00
Click the *SQL* tab to continue.
Your entries in the *Move Objects* dialog generate a SQL command (see an example
below). Use the *SQL* tab for review; revisit the *General* tab to modify the
SQL command.
2016-06-16 02:55:29 -05:00
Example
*******
2016-06-16 02:55:29 -05:00
The following is an example of the sql command generated by user selections in
the *Move Objects* dialog:
2016-06-16 02:55:29 -05:00
.. image:: images/move_objects_sql.png
:alt: Move Objects dialog sql tab
:align: center
2016-06-16 02:55:29 -05:00
The example shown demonstrates moving materialized views owned by Alice from
tablespace *tbspace_01* to *tbspace_02*.
2016-06-16 02:55:29 -05:00
* Click the *Help* button (?) to access online help.
2016-06-16 02:55:29 -05:00
* Click the *OK* button to save work.
* Click the *Cancel* button to exit without saving work.