agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH 5/7] Small language fixen
Date: Sun, 22 Nov 2020 19:02:36 -0600
---
doc/src/sgml/ref/create_statistics.sgml | 22 +++++++++++-----------
src/backend/statistics/extended_stats.c | 4 ++--
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/doc/src/sgml/ref/create_statistics.sgml b/doc/src/sgml/ref/create_statistics.sgml
index f4a75b3c8e..b4721da583 100644
--- a/doc/src/sgml/ref/create_statistics.sgml
+++ b/doc/src/sgml/ref/create_statistics.sgml
@@ -141,10 +141,10 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na
</para>
<para>
- Creating expressions statistics is allowed only when there actually are
- any expression. Expression statistics are per-expression and are very
- similar to creating index on the expression, except that it eliminates
- the index maintenance overhead.
+ Creating expression statistics is allowed only when expressions are given.
+ Expression statistics are per-expression and are
+ similar to creating an index on the expression, except that they avoid
+ the overhead of the index.
</para>
<para>
@@ -156,13 +156,13 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na
</para>
<para>
- All functions and operators used in an statistics definition must be
+ All functions and operators used in a statistics definition must be
<quote>immutable</quote>, that is, their results must depend only on
- their arguments and never on any outside influence (such as
+ their arguments and never on any external factors (such as
the contents of another table or the current time). This restriction
ensures that the behavior of the statistics is well-defined. To use a
user-defined function in a statistics expression, remember to mark
- the function immutable when you create it.
+ the function immutable.
</para>
</refsect1>
@@ -171,8 +171,8 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na
<para>
Create table <structname>t1</structname> with two functionally dependent columns, i.e.,
- knowledge of a value in the first column is sufficient for determining the
- value in the other column. Then functional dependency statistics are built
+ knowledge of the value of the first column fully defines the
+ value of the other column. Then functional dependency statistics are built
on those columns:
<programlisting>
@@ -238,8 +238,8 @@ EXPLAIN ANALYZE SELECT * FROM t2 WHERE (a = 1) AND (b = 2);
<para>
Create table <structname>t3</structname> with a single timestamp column,
and run a query using an expression on that column.
- knowledge of a value in the first column is sufficient for determining the
- value in the other column. Then functional dependency statistics are built
+ Knowledge of the value of the first column fully defines the
+ value of the other column. Then functional dependency statistics are built
on those columns:
<programlisting>
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index c6072311bf..aa95e0939a 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -2756,7 +2756,7 @@ evaluate_expressions(Relation rel, List *exprs, int numrows, HeapTuple *rows)
len += MAXALIGN(sizeof(Datum *) * nexprs);
len += nexprs * MAXALIGN(sizeof(Datum) * numrows);
- /* values */
+ /* nulls */
len += MAXALIGN(sizeof(bool *) * nexprs);
len += nexprs * MAXALIGN(sizeof(bool) * numrows);
@@ -2877,7 +2877,7 @@ evaluate_expressions(Relation rel, List *exprs, int numrows, HeapTuple *rows)
*
* Treat the expressions as attributes with attnums above the regular
* attnum range. This will allow us to handle everything in the same
- * way, and identify exressions in the dependencies.
+ * way, and identify expressions in the dependencies.
*
* XXX This always creates a copy of the bitmap. We might optimize this
* by only creating the copy with (nexprs > 0) but then we'd have to track
--
2.17.0
--fUYQa+Pmc3FrFX/N
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0006-Some-cleanup.patch"
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 5/7] Small language fixen
In-Reply-To: <no-message-id-185016@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox