Re: Error in sql script

2021-09-01 Thread Mathieu Decelles St-Pierre
So there is no SQL command that we can use to list the Text Search
Configurations on a system?

Mathieu
mathieu.decelles.stpie...@gmail.com



On Tue, Aug 31, 2021 at 3:22 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:

> On Tuesday, August 31, 2021, PG Doc comments form 
> wrote:
>
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/13/textsearch-configuration.html
>> Description:
>>
>> In /13/textsearch-configuration.html, the last script block starts with
>> some
>> incorrect characters and we do not see the sql command to list the Text
>> Search Configurations.
>>
>
> The last script relies upon the psql program and its exploratory
> meta-commands.
>
> David J.
>
>


Inaccurate usage of "which" instead of "that" in parallel.sgml

2021-09-01 Thread Elena Indrupskaya

Hi everybody,

I noticed that in parallel.sgml, "which" is often used in defining 
clauses, where "that" is appropriate
(as explained at 
https://www.grammarly.com/blog/which-vs-that/?&utm_source=google&utm_medium=cpc&utm_campaign=11907689446&utm_targetid=aud-1117013793091:dsa-1233402314764&gclid=CjwKCAjwybyJBhBwEiwAvz4G77NN1eaRDOA4eGNa38UsoWXJwRG43pegXBNOiamA3Y0A3FHhZzFJJRoCXEMQAvD_BwE&gclsrc=aw.ds). 
So I attached a patch to fix this and also to add a preceding comma 
before "which" in one non-defining clause.


Since the content of parallel.sgml is not new, the documentation for 
earlier versions of PostgreSQL has the same inaccuracies, and it would 
be great to fix them there too. The patch also applies to versions 12 
and 13, except one @@ section).


Thank you.

--
Elena Indrupskaya
Lead Technical Writer
Postgres Professional http://www.postgrespro.com 

diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index 479e24a1dcb..13479d7e5e3 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -8,11 +8,11 @@
   
 
   
-   PostgreSQL can devise query plans which can leverage
+   PostgreSQL can devise query plans that can leverage
multiple CPUs in order to answer queries faster.  This feature is known
as parallel query.  Many queries cannot benefit from parallel query, either
due to limitations of the current implementation or because there is no
-   imaginable query plan which is any faster than the serial query plan.
+   imaginable query plan that is any faster than the serial query plan.
However, for queries that can benefit, the speedup from parallel query
is often very significant.  Many queries can run more than twice as fast
when using parallel query, and some queries can run four times faster or
@@ -27,7 +27,7 @@
 

 When the optimizer determines that parallel query is the fastest execution
-strategy for a particular query, it will create a query plan which includes
+strategy for a particular query, it will create a query plan that includes
 a Gather or Gather Merge
 node.  Here is a simple example:
 
@@ -59,7 +59,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';

 Using EXPLAIN, you can see the number of
 workers chosen by the planner.  When the Gather node is reached
-during query execution, the process which is implementing the user's
+during query execution, the process that is implementing the user's
 session will request a number of background
 worker processes equal to the number
 of workers chosen by the planner.  The number of background workers that
@@ -79,7 +79,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';

 

-Every background worker process which is successfully started for a given
+Every background worker process that is successfully started for a given
 parallel query will execute the parallel portion of the plan.  The leader
 will also execute that portion of the plan, but it has an additional
 responsibility: it must also read all of the tuples generated by the
@@ -88,7 +88,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
 worker, speeding up query execution.  Conversely, when the parallel portion
 of the plan generates a large number of tuples, the leader may be almost
 entirely occupied with reading the tuples generated by the workers and
-performing any further processing steps which are required by plan nodes
+performing any further processing steps that are required by plan nodes
 above the level of the Gather node or
 Gather Merge node.  In such cases, the leader will
 do very little of the work of executing the parallel portion of the plan.
@@ -109,7 +109,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   When Can Parallel Query Be Used?
 
   
-There are several settings which can cause the query planner not to
+There are several settings that can cause the query planner not to
 generate a parallel query plan under any circumstances.  In order for
 any parallel query plans whatsoever to be generated, the following
 settings must be configured as indicated.
@@ -119,7 +119,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
 
   
  must be set to a
-value which is greater than zero. This is a special case of the more
+value that is greater than zero. This is a special case of the more
 general principle that no more workers should be used than the number
 configured via max_parallel_workers_per_gather.
   
@@ -144,8 +144,8 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
 The query writes any data or locks any database rows. If a query
 contains a data-modifying operation either at the top level or within
 a CTE, no parallel plans for that query will be generated.

Simple re-wording

2021-09-01 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/bug-reporting.html
Description:

"Before you report a bug, please read and re-read the documentation to
verify that you can really do whatever it is you are trying." =>

"Before you report a bug, please read and re-read the documentation to
confirm that you really can not do whatever it is you are trying."


Re: Simple re-wording

2021-09-01 Thread David G. Johnston
On Wednesday, September 1, 2021, PG Doc comments form <
nore...@postgresql.org> wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/11/bug-reporting.html
> Description:
>
> "Before you report a bug, please read and re-read the documentation to
> verify that you can really do whatever it is you are trying." =>
>
> "Before you report a bug, please read and re-read the documentation to
> confirm that you really can not do whatever it is you are trying."
>

The suggestion isn’t an improvememt, not that you’ve even tried to explain
your reasoning.

David J.


Re: Inaccurate usage of "which" instead of "that" in parallel.sgml

2021-09-01 Thread Michael Paquier
On Wed, Sep 01, 2021 at 01:24:18PM +0300, Elena Indrupskaya wrote:
> Since the content of parallel.sgml is not new, the documentation for earlier
> versions of PostgreSQL has the same inaccuracies, and it would be great to
> fix them there too. The patch also applies to versions 12 and 13, except one
> @@ section).

Thanks Elena for caring about that.  Agreed that these are
improvements.
--
Michael


signature.asc
Description: PGP signature


Re: Simple re-wording

2021-09-01 Thread Michael Minock
Well the sentence read funny to me. But after reading it again now I see
that what you mean is that the subject should confirm that what they are
trying to do should actually be achievable.

Note that I am going through the entire documentation over the next week or
so and will try to eagle eye any corrections if I can. This is the only
sentence I have found problematic so far and now upon reflection I think I
can chalk this up to my own misunderstanding.

On Wed, 1 Sept 2021 at 14:27, David G. Johnston 
wrote:

> On Wednesday, September 1, 2021, PG Doc comments form <
> nore...@postgresql.org> wrote:
>
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/11/bug-reporting.html
>> Description:
>>
>> "Before you report a bug, please read and re-read the documentation to
>> verify that you can really do whatever it is you are trying." =>
>>
>> "Before you report a bug, please read and re-read the documentation to
>> confirm that you really can not do whatever it is you are trying."
>>
>
> The suggestion isn’t an improvememt, not that you’ve even tried to explain
> your reasoning.
>
> David J.
>
>


Re: I came here to determine how much storage a boolean variable uses

2021-09-01 Thread Bruce Momjian
On Mon, Aug 30, 2021 at 12:16:13PM -0400, Jonathan Katz wrote:
> > https://www.postgresql.org/docs/current/storage-page-layout.html#STORAGE-TUPLE-LAYOUT
> > 
> 
> Well, it is provided one level deeper in the data type docs, e.g.:
> 
> https://www.postgresql.org/docs/13/datatype-boolean.html
> 
> I think it's a reasonable request to consider. It potentially duplicates
> the info in the data types section (i.e. one more thing to maintain),
> but it does provide some convenience for scanning it across the
> consolidated table.

FYI, I usually use psql's \dTS+.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: Error in sql script

2021-09-01 Thread Bruce Momjian
On Tue, Aug 31, 2021 at 06:14:32PM -0700, David G. Johnston wrote:
> On Tuesday, August 31, 2021, Mathieu Decelles St-Pierre <
> mathieu.decelles.stpie...@gmail.com> wrote:
> 
> So there is no SQL command that we can use to list the Text Search
> Configurations on a system?
> 
> 
> There is…its not like psql has some special privilege to get that info from 
> the
> server…
> 
> You can either get psql to show you the query it uses or lookup the available
> catalogs in the documentation and find the one that provides what you need.

If you run psql with -E, you will see the SQL queries used for the
backslash commands, and those queries can be run anywhere.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: Simple re-wording

2021-09-01 Thread Bruce Momjian
On Wed, Sep  1, 2021 at 03:14:34PM +0200, Michael Minock wrote:
> Well the sentence read funny to me. But after reading it again now I see that
> what you mean is that the subject should confirm that what they are trying to
> do should actually be achievable.  
> 
> Note that I am going through the entire documentation over the next week or so
> and will try to eagle eye any corrections if I can. This is the only sentence 
> I
> have found problematic so far and now upon reflection I think I can chalk this
> up to my own misunderstanding. 

Great, thanks for your reviewing this and let us know what else you
find.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: Clarify how triggers relate to transactions

2021-09-01 Thread Tom Lane
Laurenz Albe  writes:
> On Fri, 2021-07-30 at 16:20 -0400, Tom Lane wrote:
>> I think it'd work out best to make this a separate para after the
>> one that defines before/after/instead-of triggers.  How do you
>> like the attached?

> That is better, and I like your patch.  Thanks!
> Keeping paragraphs short is a good thing.

Pushed like that, then.

regards, tom lane




Re: Inaccurate usage of "which" instead of "that" in parallel.sgml

2021-09-01 Thread Michael Paquier
On Wed, Sep 01, 2021 at 10:34:42PM +0900, Michael Paquier wrote:
> Thanks Elena for caring about that.  Agreed that these are
> improvements.

And done.  There were extra conflicts with 10 and 9.6 simple enough to
solve, so backpatched all the way down.
--
Michael


signature.asc
Description: PGP signature