pgsql: Remove unnecessary Windows-specific basebackup code.

2022-07-21 Thread Thomas Munro
Remove unnecessary Windows-specific basebackup code. Commit c6f2f016 added an explicit check for a Windows "junction point". That turned out to be needed only because get_dirent_type() was busted on Windows. It's been fixed by commit 9d3444dc, so remove it. Add a TAP-test to demonstrate that in-

pgsql: Remove unnecessary Windows-specific basebackup code.

2022-07-21 Thread Thomas Munro
Remove unnecessary Windows-specific basebackup code. Commit c6f2f016 added an explicit check for a Windows "junction point". That turned out to be needed only because get_dirent_type() was busted on Windows. It's been fixed by commit 9d3444dc, so remove it. Add a TAP-test to demonstrate that in-

pgsql: Fix get_dirent_type() for Windows junction points.

2022-07-21 Thread Thomas Munro
Fix get_dirent_type() for Windows junction points. Commit 87e6ed7c8 added code that intended to report Windows "junction points" as DT_LNK (the same way we report symlinks on Unix). Windows junction points are *also* directories according to the Windows attributes API, and we were reporting them

pgsql: Fix get_dirent_type() for Windows junction points.

2022-07-21 Thread Thomas Munro
Fix get_dirent_type() for Windows junction points. Commit 87e6ed7c8 added code that intended to report Windows "junction points" as DT_LNK (the same way we report symlinks on Unix). Windows junction points are *also* directories according to the Windows attributes API, and we were reporting them

pgsql: Fix get_dirent_type() for Windows junction points.

2022-07-21 Thread Thomas Munro
Fix get_dirent_type() for Windows junction points. Commit 87e6ed7c8 added code that intended to report Windows "junction points" as DT_LNK (the same way we report symlinks on Unix). Windows junction points are *also* directories according to the Windows attributes API, and we were reporting them

pgsql: postgres_fdw: Fix bug in checking of return value of PQsendQuery

2022-07-21 Thread Fujii Masao
postgres_fdw: Fix bug in checking of return value of PQsendQuery(). When postgres_fdw begins an asynchronous data fetch, it submits FETCH query by using PQsendQuery(). If PQsendQuery() fails and returns 0, postgres_fdw should report an error. But, previously, postgres_fdw reported an error only wh

pgsql: postgres_fdw: Fix bug in checking of return value of PQsendQuery

2022-07-21 Thread Fujii Masao
postgres_fdw: Fix bug in checking of return value of PQsendQuery(). When postgres_fdw begins an asynchronous data fetch, it submits FETCH query by using PQsendQuery(). If PQsendQuery() fails and returns 0, postgres_fdw should report an error. But, previously, postgres_fdw reported an error only wh

pgsql: postgres_fdw: Fix bug in checking of return value of PQsendQuery

2022-07-21 Thread Fujii Masao
postgres_fdw: Fix bug in checking of return value of PQsendQuery(). When postgres_fdw begins an asynchronous data fetch, it submits FETCH query by using PQsendQuery(). If PQsendQuery() fails and returns 0, postgres_fdw should report an error. But, previously, postgres_fdw reported an error only wh

pgsql: Remove O_FSYNC and associated macros.

2022-07-21 Thread Thomas Munro
Remove O_FSYNC and associated macros. O_FSYNC was a pre-POSIX way of spelling O_SYNC, supported since commit 9d645fd84c3 for non-conforming operating systems of the time. It's not needed on any modern system. We can just use standard O_SYNC directly if it exists (= all targeted systems except Wi

pgsql: Extend size_t support in pg_bitutils.h.

2022-07-21 Thread Thomas Munro
Extend size_t support in pg_bitutils.h. Use a more compact notation that allows us to add more size_t variants as required. This will be used by a later commit. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CA%2BhUKG%2B7dSX1XF8yFGmYk-%3D48dbjH2kmzZj16XvhbrWP-9BzRg%40mail.gmail.com Bra

pgsql: Remove fls(), use pg_leftmost_one_pos32() instead.

2022-07-21 Thread Thomas Munro
Remove fls(), use pg_leftmost_one_pos32() instead. Commit 4f658dc8 provided the traditional BSD fls() function in src/port/fls.c so it could be used in several places. Later we added a bunch of similar facilities in pg_bitutils.h, based on compiler builtins that map to hardware instructions. It'

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a4f09ef

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: doc: use wording "restore" instead of "reload" of dumps

2022-07-21 Thread Bruce Momjian
doc: use wording "restore" instead of "reload" of dumps Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: Make the name optional in CREATE STATISTICS.

2022-07-21 Thread Dean Rasheed
Make the name optional in CREATE STATISTICS. This allows users to omit the statistics name in a CREATE STATISTICS command, letting the system auto-generate a sensible, unique name, putting the statistics object in the same schema as the table. Simon Riggs, reviewed by Matthias van de Meent. Disc

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_14_STABLE Detail

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_10_STABLE Detail

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- master Details -

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_13_STABLE Detail

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_11_STABLE Detail

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_12_STABLE Detail

pgsql: doc: clarify that auth. names are lower case and case-sensitive

2022-07-21 Thread Bruce Momjian
doc: clarify that auth. names are lower case and case-sensitive This is true even for acronyms that are usually upper case, like LDAP. Reported-by: Alvaro Herrera Discussion: https://postgr.es/m/[email protected] Backpatch-through: 10 Branch -- REL_15_STABLE Detail

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: Fix ruleutils issues with dropped cols in functions-returning-co

2022-07-21 Thread Tom Lane
Fix ruleutils issues with dropped cols in functions-returning-composite. Due to lack of concern for the case in the dependency code, it's possible to drop a column of a composite type even though stored queries have references to the dropped column via functions-in-FROM that return the composite t

pgsql: relnotes: improve PG 15 schema permission change wording

2022-07-21 Thread Bruce Momjian
relnotes: improve PG 15 schema permission change wording Reported-by: Noah Misch Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 only Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c69616c9386003fd62692bd330

pgsql: Add missing space in comments.

2022-07-21 Thread Amit Kapila
Add missing space in comments. Author: Junwang Zhao Discussion: https://postgr.es/m/caeg8a3++yq6a-y5-w6kxp8qh6qxdjdk4detzw0clcw9bsqf...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2a51a066dd3e54e7087cf02f862c8067c78b9d0a Modified Files -