Subject: typos

From: Justin Pryzby <[email-masked]>
Date: Fri, 24 Sep 2021 16:58:27 -0500

A compilation of fixes for master.

The first patch should be applied to v13 - the typo was already fixed in master
but not backpatched.

---

From: Justin Pryzby <[email-masked]>
Date: Sun, 26 Sep 2021 12:01:17 -0500

> A compilation of fixes for master.

Thanks Michael for applying fixes to user-facing docs (I hadn't realized that
the 2nd one needed to be backpatched).

This fixes an file I failed to include in the "recheck" patch and more typos
for extended stats (+Tomas).

+Andres (Jit), +Zhihong (file header comments).

---

From: Michael Paquier <[email-masked]>
Date: Mon, 27 Sep 2021 09:24:27 +0900

> the 2nd one needed to be backpatched).

Yes, thanks for compiling all these.  The two changes committed were
the only user-visible changes, which is why I have hastened this part
to include those fixes.  The rest could just go on HEAD.
--
Michael

---

From: Michael Paquier <[email-masked]>
Date: Mon, 27 Sep 2021 14:23:50 +0900

> to include those fixes.  The rest could just go on HEAD.

I have looked at the full set, and applied 0003, 0006, 0009, 0010 and
0011.  0001 has been discussed separately, and I am really not sure if
that's worth bothering.  0002 may actually break some code?  I have
let 0004 and 0005 alone.  0007 could be related to the discussion
where we could just remove all those IDENTIFICATION fields.  The use
of "statistic", "statistics" and "statistics object" in 0008 and 0012
is indeed inconsistent.  The latter term is the most used, but it
sounds a bit weird to me even if it refers to the DDL object
manipulated.  Simply using "statistics" would be tempting.
--
Michael

---

From: Alvaro Herrera <[email-masked]>
Date: Mon, 27 Sep 2021 18:04:02 -0300

On 2021-Sep-27, Michael Paquier wrote:

> The use

Initially we just used "statistic" as a noun, which IIRC was already
grammatically wrong (but I didn't know that and I think Tomas didn't
either); later at some point when discussing how to use that noun in
plural we realized this and argued that merely using "statistics" was
even more wrong.  It was then that we started using the term "statistics
object" with plural "statistics objects".  Going back to using just
"statistics" is unlikely to have become correct; I think Justin's
patches 0008 and 0012 are correct.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"La libertad es como el dinero; el que no la sabe emplear la pierde" (Alvarez)

---

From: Michael Paquier <[email-masked]>
Date: Tue, 28 Sep 2021 08:53:35 +0900

> patches 0008 and 0012 are correct.

Thanks for confirming.

     if (list_length(pstate->p_rtable) != 1)
         ereport(ERROR,
                 (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-                 errmsg("statistics expressions can refer only to the table being indexed")));
+                 errmsg("statistics expressions can refer only to the table being referenced")));
This part should be backpatched?  The code claims that this should
be dead code so an elog() would be more adapted, and the same can be
said about transformRuleStmt() and transformIndexStmt(), no?  That
would be less messages to translate. 
--
Michael

---

From: Justin Pryzby <[email-masked]>
Date: Mon, 27 Sep 2021 19:50:02 -0500

> patches 0008 and 0012 are correct.

Attached is an updated patch fixing more of the same.

-- 
Justin

---

From: Michael Paquier <[email-masked]>
Date: Tue, 28 Sep 2021 11:15:39 +0900

> Attached is an updated patch fixing more of the same.

Does this include everything you have spotted, as well as everything
from the previous patches 0008 and 0012 posted?
--
Michael

---

From: Justin Pryzby <[email-masked]>
Date: Mon, 27 Sep 2021 21:27:56 -0500

> from the previous patches 0008 and 0012 posted?

That's an "expanded" version of 0008.

It doesn't include 0012, which is primarily about fixing incorrect references
to "index expressions" that should refer to stats expressions.  Naturally 0012
also uses the phrase "statistics objects", and fixes one nearby reference
that's not itself about indexes, which could arguably be in 0008 instead..

-- 
Justin

---

From: Michael Paquier <[email-masked]>
Date: Wed, 29 Sep 2021 16:26:59 +0900

> That's an "expanded" version of 0008.

Okay, thanks.

> that's not itself about indexes, which could arguably be in 0008 instead..

Merging both made the most sense to me after reviewing the whole area
of the code dedicated to stats.  This has been applied after taking
care of some issues with the indentation, with few extra tweaks.
--
Michael