pgsql: Fix output of Unicode normalization test

2019-12-10 Thread Peter Eisentraut
Fix output of Unicode normalization test Several off-by-more-than-one errors caused the output in case of a test failure to be truncated and unintelligible. Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/6a7a8516-7d11-8fbd-0e8b-eadb4f0679eb%402ndquadrant.com Branc

pgsql: Fix some compiler warnings with timestamp parsing in formatting.

2019-12-10 Thread Michael Paquier
Fix some compiler warnings with timestamp parsing in formatting.c gcc-7 used with a sufficient optimization level complains about warnings around do_to_timestamp() regarding the initialization and handling of some of its variables. Recent commits 66c74f8 and d589f94 made things made the interface

pgsql: Fix tuple column count in pg_control_init().

2019-12-10 Thread Tom Lane
Fix tuple column count in pg_control_init(). Oversight in commit 2e4db241b. Nathan Bossart Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8729fa72483f8a9acf299508bb2cbae1aa9a29b8 Mod

pgsql: Cosmetic cleaning of pg_config.h.win32

2019-12-10 Thread Peter Eisentraut
Cosmetic cleaning of pg_config.h.win32 Clean up some comments (some generated by old versions of autoconf) and some random ordering differences, so it's easier to diff this against the default pg_config.h or pg_config.h.in. Remove LOCALEDIR handling from pg_config.h.win32 altogether because it's

pgsql: Add backend-only appendStringInfoStringQuoted

2019-12-10 Thread Alvaro Herrera
Add backend-only appendStringInfoStringQuoted This provides a mechanism to emit literal values in informative messages, such as query parameters. The new code is more complex than what it replaces, primarily because it wants to be more efficient. It also has the (currently unused) additional opti

pgsql: In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster

2019-12-10 Thread Tom Lane
In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster log file. On Windows, we use CMD.EXE to redirect the postmaster's stdout/stderr into a log file. CMD.EXE will open that file with non-sharing-friendly parameters, and the file will remain open for a short time after the postmaster h

pgsql: In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster

2019-12-10 Thread Tom Lane
In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster log file. On Windows, we use CMD.EXE to redirect the postmaster's stdout/stderr into a log file. CMD.EXE will open that file with non-sharing-friendly parameters, and the file will remain open for a short time after the postmaster h

pgsql: Fix handling of multiple AFTER ROW triggers on a foreign table.

2019-12-10 Thread Etsuro Fujita
Fix handling of multiple AFTER ROW triggers on a foreign table. AfterTriggerExecute() retrieves a fresh tuple or pair of tuples from a tuplestore and then stores the tuple(s) in the passed-in slot(s) if AFTER_TRIGGER_FDW_FETCH, while it uses the most-recently-retrieved tuple(s) stored in the slot(

pgsql: Fix handling of multiple AFTER ROW triggers on a foreign table.

2019-12-10 Thread Etsuro Fujita
Fix handling of multiple AFTER ROW triggers on a foreign table. AfterTriggerExecute() retrieves a fresh tuple or pair of tuples from a tuplestore and then stores the tuple(s) in the passed-in slot(s) if AFTER_TRIGGER_FDW_FETCH, while it uses the most-recently-retrieved tuple(s) stored in the slot(