pgsql: Simplify code for getting a unicode codepoint's canonical class.

2020-12-08 Thread Michael Paquier
Simplify code for getting a unicode codepoint's canonical class. Three places of unicode_norm.c use a similar logic for getting the combining class from a codepoint. Commit 2991ac5 has added the function get_canonical_class() for this purpose, but it was only called by the backend. This commit

pgsql: jit: Reference function pointer types via llvmjit_types.c.

2020-12-08 Thread Andres Freund
jit: Reference function pointer types via llvmjit_types.c. It is error prone (see 5da871bfa1b) and verbose to manually create function types. Add a helper that can reference a function pointer type via llvmjit_types.c and and convert existing instances of manual creation. Author: Andres Freund

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Teach contain_leaked_vars that assignment SubscriptingRefs are l

2020-12-08 Thread Tom Lane
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky. array_get_element and array_get_slice qualify as leakproof, since they will silently return NULL for bogus subscripts. But array_set_element and array_set_slice throw errors for such cases, making them clearly not leakproof.

pgsql: Remove operator_precedence_warning.

2020-12-08 Thread Tom Lane
Remove operator_precedence_warning. This GUC was always intended as a temporary solution to help with finding 9.4-to-9.5 migration issues. Now that all pre-9.5 branches are out of support, and 9.5 will be too before v14 is released, it seems like it's okay to drop it. Doing so allows removal of

pgsql: Improve estimation of ANDs under ORs using extended statistics.

2020-12-08 Thread Dean Rasheed
Improve estimation of ANDs under ORs using extended statistics. Formerly, extended statistics only handled clauses that were RestrictInfos. However, the restrictinfo machinery doesn't create sub-AND RestrictInfos for AND clauses underneath OR clauses. Therefore teach extended statistics to handle

pgsql: Improve estimation of OR clauses using multiple extended statist

2020-12-08 Thread Dean Rasheed
Improve estimation of OR clauses using multiple extended statistics. When estimating an OR clause using multiple extended statistics objects, treat the estimates for each set of clauses for each statistics object as independent of one another. The overlap estimates produced for each statistics

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: clarify that CREATE TABLE discards redundant unique constra

2020-12-08 Thread Tom Lane
Doc: clarify that CREATE TABLE discards redundant unique constraints. The SQL standard says that redundant unique constraints are disallowed, but we long ago decided that throwing an error would be too user-unfriendly, so we just drop redundant ones. The docs weren't very clear about that

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Doc: explain that the string types can't store \0 (ASCII NUL).

2020-12-08 Thread Tom Lane
Doc: explain that the string types can't store \0 (ASCII NUL). This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion:

pgsql: Speed up rechecking if relation needs to be vacuumed or analyze

2020-12-08 Thread Fujii Masao
Speed up rechecking if relation needs to be vacuumed or analyze in autovacuum. After autovacuum collects the relations to vacuum or analyze, it rechecks whether each relation still needs to be vacuumed or analyzed before actually doing that. Previously this recheck could be a significant overhead

pgsql: Bump catversion for pg_stat_wal changes.

2020-12-08 Thread Fujii Masao
Bump catversion for pg_stat_wal changes. Oversight in 01469241b2. Reported-by: Andres Freund Discussion: https://postgr.es/m/20201207185614.zzf63vggm5r4s...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4e43ee88c28b725bb63e27609c1a717138fc7f39

Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t

2020-12-08 Thread Fujii Masao
On 2020/12/08 3:56, Andres Freund wrote: Hi, On 2020-12-02 04:04:57 +, Fujii Masao wrote: Track total number of WAL records, FPIs and bytes generated in the cluster. Commit 6b466bf5f2 allowed pg_stat_statements to track the number of WAL records, full page images and bytes that each