ALTER DATABASE
Synopsis
Use the ALTER DATABASE
statement to redefine the attributes of a database.
Syntax
alter_database ::= ALTER DATABASE name
[ [ WITH ] alter_database_option [ ... ]
| RENAME TO name
| OWNER TO { new_owner
| CURRENT_USER
| SESSION_USER }
| SET TABLESPACE new_tablespace
| SET configuration_parameter { TO | = }
{ value | DEFAULT }
| SET configuration_parameter FROM CURRENT
| RESET configuration_parameter
| RESET ALL ]
alter_database_option ::= ALLOW_CONNECTIONS allowconn
| CONNECTION LIMIT connlimit
| IS_TEMPLATE istemplate
alter_database
alter_database_option
Semantics
NoteSome options in DATABASE are under development.
name
Specify the name of the database to be altered.
tablespace_name
Specify the new tablespace that is associated with the database.
ALLOW_CONNECTIONS
Specify false
to disallow connections to this database. Default is true
, which allows this database to be cloned by any user with CREATEDB
privileges.
CONNECTION_LIMIT
Specify how many concurrent connections can be made to this database. Default of -1
allows unlimited concurrent connections.
IS_TEMPLATE
Strue
— This database can be cloned by any user with CREATEDB
privileges.Specify false
to Only superusers or the owner of the database can clone it.
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .