Re: Indexes on Expressions - a note to remind users to run ANALYZE after creation

2021-07-19 Thread Laurenz Albe
On Fri, 2021-07-16 at 22:00 -0700, Nikolay Samokhvalov wrote:
> diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
> index 
> 671299ff059d972ff95bdb1d67ed4c89bf5040b2..c7eaf9a608e995ef9957b4e0f677b36a8303be55
>  100644
> --- a/doc/src/sgml/indices.sgml
> +++ b/doc/src/sgml/indices.sgml
> @@ -741,6 +741,15 @@ CREATE INDEX people_names ON people ((first_name || ' ' 
> || last_name));
> query.  Thus, indexes on expressions are useful when retrieval speed
> is more important than insertion and update speed.
>
> +
> +  
> +   Note
> +   
> +Once an index on an expression is successfully created, it is important 
> to
> +run ANALYZE on the corresponding table to gather
> +statistics for the expression.
> +   
> +  
>   

I agree in principle.  It should be "has been created" rather than "is created",
and I would say something less drastic like "usually a good idea" rather than
"important".

Yours,
Laurenz Albe





Re: Manua correction

2021-07-19 Thread Bruce Momjian
On Thu, Jul 15, 2021 at 11:12:38PM -0400, Tom Lane wrote:
> Bruce Momjian  writes:
> > Interesting.  I see several cases where our docs are not clear we
> > process only the first match:
> 
> At least two of these changes are flat out wrong.  The places
> that explicitly mention "substring(s)" are not doing so because
> we failed to think about what that meant.

I really don't understand the use of "(s)" except in place where we are
really trying to point out the idea of one or multiple, and I don't see
that being significant in these cases --- can you clarify?

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

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





Re: user-defined function in Perl or Tcl ???

2021-07-19 Thread Bruce Momjian
On Fri, Jul 16, 2021 at 10:56:31PM -0700, Nikolay Samokhvalov wrote:
> Curious: why plv8 is still not in the core distro?
> 
> (apologies for top posting)

plv8 requires a ton of dependencies and is very hard to build.

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

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





Exponentiation example not clear

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

Page: https://www.postgresql.org/docs/13/functions-math.html
Description:

Quoting the docs:

Exponentiation (unlike typical mathematical practice, multiple uses of ^
will associate left to right)
2 ^ 3 → 8
2 ^ 3 ^ 3 → 512

You could probably add 

2 ^ (3 ^ 3) → 134217728 # 2 ^27


Another pg_dump using split and gzip for large databases

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

Page: https://www.postgresql.org/docs/10/backup-dump.html
Description:

pg_dump ccbank | split -b 2048m --filter='gzip > $FILE.gz'


Headers for each index

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

Page: https://www.postgresql.org/docs/13/indexes-types.html
Description:

For easier visual navigation could you please add headers or color the
different types of indexes? At the moment, one needs to read the whole
document or do search in the page to find the available indexes.

Thanks a ton!