alter_index.7
来自「PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开」· 7 代码 · 共 106 行
7
106 行
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "ALTER INDEX" "" "2008-01-03" "SQL - Language Statements" "SQL Commands".SH NAMEALTER INDEX \- change the definition of an index.SH SYNOPSIS.sp.nfALTER INDEX \fIname\fR RENAME TO \fInew_name\fRALTER INDEX \fIname\fR SET TABLESPACE \fItablespace_name\fRALTER INDEX \fIname\fR SET ( \fIstorage_parameter\fR = \fIvalue\fR [, ... ] )ALTER INDEX \fIname\fR RESET ( \fIstorage_parameter\fR [, ... ] ).sp.fi.SH "DESCRIPTION".PP\fBALTER INDEX\fR changes the definition of an existing index.There are several subforms:.TP\fBRENAME\fRThe RENAME form changes the name of the index. There is no effect on the stored data..TP\fBSET TABLESPACE\fRThis form changes the index's tablespace to the specified tablespace andmoves the data file(s) associated with the index to the new tablespace.See also CREATE TABLESPACE [\fBcreate_tablespace\fR(7)]..TP\fBSET ( \fIstorage_parameter\fB = \fIvalue\fB [, ... ] )\fRThis form changes one or more index-method-specific storage parametersfor the index. SeeCREATE INDEX [\fBcreate_index\fR(7)]for details on the available parameters. Note that the index contentswill not be modified immediately by this command; depending on theparameter you may need to rebuild the index withREINDEX [\fBreindex\fR(7)]to get the desired effects..TP\fBRESET ( \fIstorage_parameter\fB [, ... ] )\fRThis form resets one or more index-method-specific storage parameters totheir defaults. As with SET, a REINDEXmay be needed to update the index entirely..PP.SH "PARAMETERS".TP\fB\fIname\fB\fRThe name (possibly schema-qualified) of an existing index toalter..TP\fB\fInew_name\fB\fRNew name for the index..TP\fB\fItablespace_name\fB\fRThe tablespace to which the index will be moved..TP\fB\fIstorage_parameter\fB\fRThe name of an index-method-specific storage parameter..TP\fB\fIvalue\fB\fRThe new value for an index-method-specific storage parameter.This might be a number or a word depending on the parameter..SH "NOTES".PPThese operations are also possible usingALTER TABLE [\fBalter_table\fR(7)].\fBALTER INDEX\fR is in fact just an alias for the formsof \fBALTER TABLE\fR that apply to indexes..PPThere was formerly an \fBALTER INDEX OWNER\fR variant, butthis is now ignored (with a warning). An index cannot have an ownerdifferent from its table's owner. Changing the table's ownerautomatically changes the index as well..PPChanging any part of a system catalog index is not permitted..SH "EXAMPLES".PPTo rename an existing index:.sp.nfALTER INDEX distributors RENAME TO suppliers;.sp.fi.PPTo move an index to a different tablespace:.sp.nfALTER INDEX distributors SET TABLESPACE fasttablespace;.sp.fi.PPTo change an index's fill factor (assuming that the index methodsupports it):.sp.nfALTER INDEX distributors SET (fillfactor = 75);REINDEX INDEX distributors;.sp.fi.SH "COMPATIBILITY".PP\fBALTER INDEX\fR is a PostgreSQLextension..SH "SEE ALSO"CREATE INDEX [\fBcreate_index\fR(7)], REINDEX [\fBreindex\fR(l)]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?