diff options
Diffstat (limited to 'doc/src/sgml')
| -rw-r--r-- | doc/src/sgml/catalogs.sgml | 24 | ||||
| -rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 24 | ||||
| -rw-r--r-- | doc/src/sgml/ref/analyze.sgml | 4 |
3 files changed, 28 insertions, 24 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index f917652a085..74b2c4b4e16 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.218 2010/01/17 22:56:21 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.219 2010/01/22 16:40:18 rhaas Exp $ --> <!-- Documentation of the system catalogs, directed toward PostgreSQL developers --> @@ -902,19 +902,6 @@ </row> <row> - <entry><structfield>attdistinct</structfield></entry> - <entry><type>float4</type></entry> - <entry></entry> - <entry> - <structfield>attdistinct</structfield>, if nonzero, is a user-specified - number-of-distinct-values figure to be used instead of estimating the - number of distinct values during <command>ANALYZE</>. Nonzero values - have the same meanings as for - <link linkend="catalog-pg-statistic"><structname>pg_statistic</></link>.<structfield>stadistinct</> - </entry> - </row> - - <row> <entry><structfield>attlen</structfield></entry> <entry><type>int2</type></entry> <entry></entry> @@ -1061,6 +1048,15 @@ </entry> </row> + <row> + <entry><structfield>attoptions</structfield></entry> + <entry><type>text[]</type></entry> + <entry></entry> + <entry> + Attribute-level options, as <quote>keyword=value</> strings + </entry> + </row> + </tbody> </tgroup> </table> diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 354fa20edf7..7f4cb37e6e3 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.109 2009/09/18 05:00:41 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.110 2010/01/22 16:40:18 rhaas Exp $ PostgreSQL documentation --> @@ -39,7 +39,8 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> DROP DEFAULT ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET | DROP } NOT NULL ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS <replaceable class="PARAMETER">integer</replaceable> - ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS DISTINCT <replaceable class="PARAMETER">number</replaceable> + ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET ( <replaceable class="PARAMETER">attribute_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] ) + ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> RESET ( <replaceable class="PARAMETER">attribute_option</replaceable> [, ... ] ) ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN } ADD <replaceable class="PARAMETER">table_constraint</replaceable> DROP CONSTRAINT [ IF EXISTS ] <replaceable class="PARAMETER">constraint_name</replaceable> [ RESTRICT | CASCADE ] @@ -158,14 +159,21 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> </varlistentry> <varlistentry> - <term><literal>SET STATISTICS DISTINCT</literal></term> + <term><literal>SET ( <replaceable class="PARAMETER">attribute_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )</term></literal> + <term><literal>RESET ( <replaceable class="PARAMETER">attribute_option</replaceable> [, ... ] )</literal> <listitem> <para> - This form overrides the number-of-distinct-values estimate made by - subsequent <xref linkend="sql-analyze" endterm="sql-analyze-title"> - operations. When set to a positive value, <command>ANALYZE</> will - assume that the column contains exactly the specified number of distinct - nonnull values. When set to a negative value, which must be greater + This form sets or resets attribute-level options. Currently, the only + define attribute-level options are <literal>n_distinct</> and + <literal>n_distinct_inherited</>, which override the + number-of-distinct-values estimate made by subsequent + <xref linkend="sql-analyze" endterm="sql-analyze-title"> + operations. <literal>n_distinct</> affects the statistics for the table + itself, while <literal>n_distinct_inherited</> affects the statistics + gathered for the table and its inheritance children. When set to a + positive value, <command>ANALYZE</> will assume that the column contains + exactly the specified number of distinct nonnull values. When set to a + negative value, which must be greater than or equal to -1, <command>ANALYZE</> will assume that the number of distinct nonnull values in the column is linear in the size of the table; the exact count is to be computed by multiplying the estimated diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index cb9f20f3f56..7564ce1448e 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.27 2009/08/04 22:04:37 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.28 2010/01/22 16:40:18 rhaas Exp $ PostgreSQL documentation --> @@ -173,7 +173,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re with the largest possible statistics target. If this inaccuracy leads to bad query plans, a more accurate value can be determined manually and then installed with - <command>ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT</> + <command>ALTER TABLE ... ALTER COLUMN ... SET (n_distinct = ...)</> (see <xref linkend="sql-altertable" endterm="sql-altertable-title">). </para> </refsect1> |
