ALTER MODEL
Allows users to rename an existing model, change owner parameters, and set schema to the model.
Important: Before using a machine learning function, be aware that all the ongoing transactions might be committed.
Syntax
ALTER MODEL [[db-name.]schema.]model-name ... OWNER TO owner-name ... RENAME TO new-model-name ... SET SCHEMA schema-name
Parameters
db-name.schema |
Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example: myschema |
model-name |
The model to alter. |
|
Changes the model owner. |
RENAME TO
|
Renames the model. |
SET SCHEMA
|
Moves the model from one schema to another. |
Privileges
Any user who creates a model can drop or alter his or her own model. If you are the dbadmin user, you can drop or alter any model in the database.
Examples
This example shows how you can alter an existing model to rename the model.
=> ALTER MODEL mymodel RENAME to mykmeansmodel; ALTER MODEL
This example shows how you can alter an existing model to change the owner.
=> ALTER MODEL mykmeansmodel OWNER TO user1; ALTER MODEL
This example shows how you can alter an existing model to rename the model.
=> ALTER MODEL mykmeansmodel SET SCHEMA public; ALTER MODEL