pgsql: Disable command echo in pg_upgrade-created windows scripts

2021-07-27 Thread Andrew Dunstan
Disable command echo in pg_upgrade-created windows scripts This makes them more like the Unix equivalents. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/91d76613b7ec75b6642accaff9

pgsql: Use the "pg_temp" schema alias in EXPLAIN and related output.

2021-07-27 Thread Tom Lane
Use the "pg_temp" schema alias in EXPLAIN and related output. This patch causes EXPLAIN output to refer to objects that are in the current session's temp schema with the "pg_temp" schema alias rather than that schema's actual name. This is useful for our own testing purposes since it will stabili

pgsql: In event triggers, use "pg_temp" only for our own temp schema.

2021-07-27 Thread Tom Lane
In event triggers, use "pg_temp" only for our own temp schema. pg_event_trigger_ddl_commands used "pg_temp" to refer to any temp schema, not only that of the current backend. This seems like overreach. It's somewhat unlikely that DDL commands would refer to temp objects of other sessions to begi

Re: pgsql: Allow numeric scale to be negative or greater than precision.

2021-07-27 Thread Simon Riggs
This is for migration? Or does it mean very small values now occupy less space since we store fewer zeros? Thanks On Mon, 26 Jul 2021 at 14:17, Dean Rasheed wrote: > > Allow numeric scale to be negative or greater than precision. > > Formerly, when specifying NUMERIC(precision, scale), the scal

Re: pgsql: Allow numeric scale to be negative or greater than precision.

2021-07-27 Thread Tom Lane
Simon Riggs writes: > This is for migration? Yeah, compatibility with some other DBMSes that allow this. > Or does it mean very small values now occupy less space since we store > fewer zeros? It won't affect space consumption at all, as NUMERIC has never stored leading or trailing zeroes. (Mo

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Avoid using ambiguous word "non-negative" in error messages.

2021-07-27 Thread Fujii Masao
Avoid using ambiguous word "non-negative" in error messages. The error messages using the word "non-negative" are confusing because it's ambiguous about whether it accepts zero or not. This commit improves those error messages by replacing it with less ambiguous word like "greater than zero" or "g

pgsql: Stabilize output of new regression test.

2021-07-27 Thread Tom Lane
Stabilize output of new regression test. Commit 48c5c9068 failed to allow for buildfarm animals that force jit = on. I'm surprised that this hasn't come up elsewhere in explain.sql, so turn it off for that whole test script not just the one new test case. Per buildfarm. Branch -- master De

Re: pgsql: Allow numeric scale to be negative or greater than precision.

2021-07-27 Thread Simon Riggs
On Tue, 27 Jul 2021 at 17:22, Tom Lane wrote: > > Simon Riggs writes: > > This is for migration? > > Yeah, compatibility with some other DBMSes that allow this. > > > Or does it mean very small values now occupy less space since we store > > fewer zeros? > > It won't affect space consumption at a

Re: pgsql: Re-enable TAP tests of pg_receivewal for ZLIB on Windows

2021-07-27 Thread Andrew Dunstan
On 7/21/21 9:08 PM, Andrew Dunstan wrote: > On 7/21/21 8:00 PM, Michael Paquier wrote: >> On Wed, Jul 21, 2021 at 10:05:19AM -0400, Andrew Dunstan wrote: >>> drongo, an MSVC animal running on the same machine, doesn't seem to have >>> an issue, nor jacana which runs msys1, so this seems possibly

pgsql: Fix bugs in polymorphic-argument resolution for multiranges.

2021-07-27 Thread Tom Lane
Fix bugs in polymorphic-argument resolution for multiranges. We failed to deal with an UNKNOWN-type input for anycompatiblemultirange; that should throw an error indicating that we don't know how to resolve the multirange type. We also failed to infer the type of an anycompatiblerange output from

pgsql: Fix bugs in polymorphic-argument resolution for multiranges.

2021-07-27 Thread Tom Lane
Fix bugs in polymorphic-argument resolution for multiranges. We failed to deal with an UNKNOWN-type input for anycompatiblemultirange; that should throw an error indicating that we don't know how to resolve the multirange type. We also failed to infer the type of an anycompatiblerange output from

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

pgsql: Set pg_setting.pending_restart when pertinent config lines are r

2021-07-27 Thread Alvaro Herrera
Set pg_setting.pending_restart when pertinent config lines are removed This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worke

Re: pgsql: Re-enable TAP tests of pg_receivewal for ZLIB on Windows

2021-07-27 Thread Michael Paquier
On Tue, Jul 27, 2021 at 02:24:12PM -0400, Andrew Dunstan wrote: > I have got to the bottom of the issue on fairywren - it was caused by > using a zlib I had build (and which is used on drongo) rather than the > mingw64 zlib package. So I've switched that. Thanks! > While doing that I uncovered so

pgsql: Remove seemingly unneeded include directory in MSVC scripts

2021-07-27 Thread David Rowley
Remove seemingly unneeded include directory in MSVC scripts This appears to have been added way back in ee3b4188a but it's a little unclear why the change made in that commit is even needed given that 320c7eb8c, dated 18 months earlier, added code to copy fmgroids.h to src/include/utils. amcheck

pgsql: Add support for SET ACCESS METHOD in ALTER TABLE

2021-07-27 Thread Michael Paquier
Add support for SET ACCESS METHOD in ALTER TABLE The logic used to support a change of access method for a table is similar to changes for tablespace or relation persistence, requiring a table rewrite with an exclusive lock of the relation changed. Table rewrites done in ALTER TABLE already go th

pgsql: Clarify some comments making use of leetspeak term "up2date"

2021-07-27 Thread Michael Paquier
Clarify some comments making use of leetspeak term "up2date" Most of these are new, as of a8fd13c, and "up-to-date" is much easier to parse for the average reader. Author: Peter Smith Discussion: https://postgr.es/m/cahut+pthbhvgojs_r9lydf21j-wn8sxottwmqnp2ifxn6t2...@mail.gmail.com Branch -

pgsql: Doc: Clarify lock levels taken during ATTACH PARTITION

2021-07-27 Thread David Rowley
Doc: Clarify lock levels taken during ATTACH PARTITION It wasn't all that clear which lock levels, if any, would be held on the DEFAULT partition during an ATTACH PARTITION operation. Also, clarify which locks will be taken if the DEFAULT partition or the table being attached are themselves parti

pgsql: Doc: Clarify lock levels taken during ATTACH PARTITION

2021-07-27 Thread David Rowley
Doc: Clarify lock levels taken during ATTACH PARTITION It wasn't all that clear which lock levels, if any, would be held on the DEFAULT partition during an ATTACH PARTITION operation. Also, clarify which locks will be taken if the DEFAULT partition or the table being attached are themselves parti

pgsql: Doc: Clarify lock levels taken during ATTACH PARTITION

2021-07-27 Thread David Rowley
Doc: Clarify lock levels taken during ATTACH PARTITION It wasn't all that clear which lock levels, if any, would be held on the DEFAULT partition during an ATTACH PARTITION operation. Also, clarify which locks will be taken if the DEFAULT partition or the table being attached are themselves parti

pgsql: Doc: Clarify lock levels taken during ATTACH PARTITION

2021-07-27 Thread David Rowley
Doc: Clarify lock levels taken during ATTACH PARTITION It wasn't all that clear which lock levels, if any, would be held on the DEFAULT partition during an ATTACH PARTITION operation. Also, clarify which locks will be taken if the DEFAULT partition or the table being attached are themselves parti