|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.109 2009/09/18 05:00:41 petere Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.110 2010/01/22 16:40:18 rhaas Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -39,7 +39,8 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
|
39 | 39 | ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> DROP DEFAULT
|
40 | 40 | ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET | DROP } NOT NULL
|
41 | 41 | ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS <replaceable class="PARAMETER">integer</replaceable>
|
42 |
| - ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS DISTINCT <replaceable class="PARAMETER">number</replaceable> |
| 42 | + ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET ( <replaceable class="PARAMETER">attribute_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] ) |
| 43 | + ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> RESET ( <replaceable class="PARAMETER">attribute_option</replaceable> [, ... ] ) |
43 | 44 | ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
|
44 | 45 | ADD <replaceable class="PARAMETER">table_constraint</replaceable>
|
45 | 46 | DROP CONSTRAINT [ IF EXISTS ] <replaceable class="PARAMETER">constraint_name</replaceable> [ RESTRICT | CASCADE ]
|
@@ -158,14 +159,21 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
|
158 | 159 | </varlistentry>
|
159 | 160 |
|
160 | 161 | <varlistentry>
|
161 |
| - <term><literal>SET STATISTICS DISTINCT</literal></term> |
| 162 | + <term><literal>SET ( <replaceable class="PARAMETER">attribute_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )</term></literal> |
| 163 | + <term><literal>RESET ( <replaceable class="PARAMETER">attribute_option</replaceable> [, ... ] )</literal> |
162 | 164 | <listitem>
|
163 | 165 | <para>
|
164 |
| - This form overrides the number-of-distinct-values estimate made by |
165 |
| - subsequent <xref linkend="sql-analyze" endterm="sql-analyze-title"> |
166 |
| - operations. When set to a positive value, <command>ANALYZE</> will |
167 |
| - assume that the column contains exactly the specified number of distinct |
168 |
| - nonnull values. When set to a negative value, which must be greater |
| 166 | + This form sets or resets attribute-level options. Currently, the only |
| 167 | + define attribute-level options are <literal>n_distinct</> and |
| 168 | + <literal>n_distinct_inherited</>, which override the |
| 169 | + number-of-distinct-values estimate made by subsequent |
| 170 | + <xref linkend="sql-analyze" endterm="sql-analyze-title"> |
| 171 | + operations. <literal>n_distinct</> affects the statistics for the table |
| 172 | + itself, while <literal>n_distinct_inherited</> affects the statistics |
| 173 | + gathered for the table and its inheritance children. When set to a |
| 174 | + positive value, <command>ANALYZE</> will assume that the column contains |
| 175 | + exactly the specified number of distinct nonnull values. When set to a |
| 176 | + negative value, which must be greater |
169 | 177 | than or equal to -1, <command>ANALYZE</> will assume that the number of
|
170 | 178 | distinct nonnull values in the column is linear in the size of the
|
171 | 179 | table; the exact count is to be computed by multiplying the estimated
|
|
0 commit comments