create_tablespace.7
来自「PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开」· 7 代码 · 共 73 行
7
73 行
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "CREATE TABLESPACE" "" "2008-01-03" "SQL - Language Statements" "SQL Commands".SH NAMECREATE TABLESPACE \- define a new tablespace.SH SYNOPSIS.sp.nfCREATE TABLESPACE \fItablespacename\fR [ OWNER \fIusername\fR ] LOCATION '\fIdirectory\fR'.sp.fi.SH "DESCRIPTION".PP\fBCREATE TABLESPACE\fR registers a new cluster-widetablespace. The tablespace name must be distinct from the name of anyexisting tablespace in the database cluster..PPA tablespace allows superusers to define an alternative location onthe file system where the data files containing database objects(such as tables and indexes) may reside..PPA user with appropriate privileges can pass\fItablespacename\fR to\fBCREATE DATABASE\fR, \fBCREATE TABLE\fR,\fBCREATE INDEX\fR or \fBADD CONSTRAINT\fR to have the datafiles for these objects stored within the specified tablespace..SH "PARAMETERS".TP\fB\fItablespacename\fB\fRThe name of a tablespace to be created. The name cannotbegin with pg_, as such namesare reserved for system tablespaces..TP\fB\fIusername\fB\fRThe name of the user who will own the tablespace. If omitted,defaults to the user executing the command. Only superusersmay create tablespaces, but they can assign ownership of tablespacesto non-superusers..TP\fB\fIdirectory\fB\fRThe directory that will be used for the tablespace. The directorymust be empty and must be owned by thePostgreSQL system user. The directory must bespecified by an absolute path name..SH "NOTES".PPTablespaces are only supported on systems that support symbolic links..PP\fBCREATE TABLESPACE\fR cannot be executed inside a transactionblock..SH "EXAMPLES".PPCreate a tablespace dbspace at /data/dbs:.sp.nfCREATE TABLESPACE dbspace LOCATION '/data/dbs';.sp.fi.PPCreate a tablespace indexspace at /data/indexesowned by user genevieve:.sp.nfCREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';.sp.fi.SH "COMPATIBILITY".PP\fBCREATE TABLESPACE\fR is a PostgreSQLextension..SH "SEE ALSO"CREATE DATABASE [\fBcreate_database\fR(7)], CREATE TABLE [\fBcreate_table\fR(l)], CREATE INDEX [\fBcreate_index\fR(l)], DROP TABLESPACE [\fBdrop_tablespace\fR(l)], ALTER TABLESPACE [\fBalter_tablespace\fR(l)]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?