SET_OBJECT_STORAGE_POLICY
Creates or changes the storage policy of a database object by assigning it a labeled storage location. The Tuple Mover uses this location to store new and existing data for this object. If the object already has an active storage policy, calling SET_OBJECT_STORAGE_POLICY
sets this object's default storage to the new labeled location. Existing data for the object is moved to the new location.
You cannot create a storage policy on a USER type storage location.
Syntax
SET_OBJECT_STORAGE_POLICY ( '[[database.]schema.]object‑name', 'location‑label' [,'key‑min', 'key‑max'] [, 'enforce‑storage‑move' ] )
Parameters
[database.]schema
|
Specifies a schema, by default myschema.thisDbObject If you specify a database, it must be the current database. |
object‑name |
Identifies the database object assigned to a labeled storage location. The object‑name can resolve to a database, schema, or table. |
location‑label |
The label of object‑name's storage location. |
key‑min
|
Valid only if object‑name is a table, specifies the range of table partition key values to store at the labeled location. |
enforce‑storage‑move |
Specifies when the Tuple Mover moves all existing storage containers for object‑name to the labeled storage location:
You can also enforce all storage policies immediately by calling Vertica meta-function |
Privileges
One of the following:
- Superuser
- Object owner and access to its storage location.