pgsql: Change SIZEOF_BOOL to 1 for Windows.

2018-05-01 Thread Tom Lane
Change SIZEOF_BOOL to 1 for Windows. For some reason it was previously defined as 0, which is silly. The only effect was to disable use of , which commit b2328bf62 intended to make possible. Thomas Munro Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%

pgsql: Fix compiler warning on Windows.

2018-05-01 Thread Tom Lane
Fix compiler warning on Windows. Commit 41c912cad caused MSVC to complain that not all control paths return a value. Thomas Munro Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com Branch -- master Details --- https://git.postgre

pgsql: Further -Wimplicit-fallthrough cleanup.

2018-05-01 Thread Andres Freund
Further -Wimplicit-fallthrough cleanup. Tom's earlier commit in 41c912cad159 didn't update a few cases that are only encountered with the non-standard --with-llvm config flag. Additionally there's also one case that appears to be a deficiency in gcc's (up to trunk as of a few days ago) detection o

pgsql: Fix some assorted compiler warnings on Windows.

2018-05-01 Thread Tom Lane
Fix some assorted compiler warnings on Windows. Don't overflow the result type of constant expressions. Don't negate unsigned types. Define HAVE_STDBOOL_H for Visual C++ 2013 and later. Thomas Munro Reviewed-By: Michael Paquier and Tom Lane Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUE

pgsql: Clean up warnings from -Wimplicit-fallthrough.

2018-05-01 Thread Tom Lane
Clean up warnings from -Wimplicit-fallthrough. Recent gcc can warn about switch-case fall throughs that are not explicitly labeled as intentional. This seems like a good thing, so clean up the warnings exposed thereby by labeling all such cases with comments that gcc will recognize. In files tha

pgsql: Improve representation of 'moved partitions' indicator on delete

2018-05-01 Thread Andres Freund
Improve representation of 'moved partitions' indicator on deleted tuples. Previously a tuple that has been moved to a different partition (see f16241bef7c), set the block number on the old tuple to an invalid value to indicate that fact. But the tuple offset was left untouched. That turned out to

Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform

2018-05-01 Thread Tom Lane
Andrew Dunstan writes: > On 04/30/2018 02:41 PM, Tom Lane wrote: >> I was just about to propose exactly that fix. This undef'ing of isnan >> traces back to Andrew's 2006 commit ea73a78b0. I think perhaps that's not >> necessary with any still-supported version of Perl; I see no evidence on >> my

pgsql: Fix interaction of foreign tuple routing with remote triggers.

2018-05-01 Thread Robert Haas
Fix interaction of foreign tuple routing with remote triggers. Without these fixes, changes to the inserted tuple made by remote triggers are ignored when building local RETURNING tuples. In the core code, call ExecInitRoutingInfo at a later point from within ExecInitPartitionInfo so that the FDW

pgsql: Remove jsonb_plperl test cases for Inf/NaN conversions.

2018-05-01 Thread Tom Lane
Remove jsonb_plperl test cases for Inf/NaN conversions. It turns out that old Perl versions (before about 5.10) don't have any very reliable way to generate Inf or NaN numeric values. Getting around that would require way more work than is really justified to test the code involved, so let's just

pgsql: Remove investigative code for can't-reattach-to-shared-memory er

2018-05-01 Thread Tom Lane
Remove investigative code for can't-reattach-to-shared-memory errors. Revert commits 23078689a, 73042b8d1, ce07aff48, f7df8043f, 6ba0cc4bd, eb16011f4, 68e7e973d, 63ca350ef. We still have a problem here, but somebody who's actually a Windows developer will need to spend time on it. Discussion: ht

pgsql: On all Windows platforms, not just Cygwin, use _timezone and _tz

2018-05-01 Thread Tom Lane
On all Windows platforms, not just Cygwin, use _timezone and _tzname. Back-patch commit 868628e4f into the 9.5 branch, so that we can support building that branch with Visual Studio 2015. This patch itself could go further back, but other VS2015 patches such as 0fb54de9a and c8e81afc6 were only b

Re: pgsql: Indexes with INCLUDE columns and their support in B-tree

2018-05-01 Thread Peter Eisentraut
On 4/7/18 16:01, Teodor Sigaev wrote: > Indexes with INCLUDE columns and their support in B-tree pg_dump from <8.2 servers is now failing. The last branch in getIndexes() is not producing the required indnkeyatts column. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL De

Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform

2018-05-01 Thread Tom Lane
I wrote: > I googled a bit and found these recommendations on stackoverflow: > my $inf= 9**9**9; > my $neginf = -9**9**9; > my $nan= -sin(9**9**9); > These do seem to produce the desired results, at least on the > couple of Perl versions I checked, including 5.8.3. Nope, buildfarm shows th

pgsql: Document that subscription tests require hstore

2018-05-01 Thread Peter Eisentraut
Document that subscription tests require hstore Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fa94fa6d8293c3a3cfdf0514f8bbd40b68bf3beb Modified Files -- src/test/subscription/README | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

pgsql: doc comments: rendering engines are another UTF8 restriction

2018-05-01 Thread Bruce Momjian
doc comments: rendering engines are another UTF8 restriction Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/81ff9ec8f8b12e03f76062000b322da6568bc941 Modified Files -- doc/src/sgml/release.sgml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

pgsql: docs comments: clarify why not to use UTF8 still in docs

2018-05-01 Thread Bruce Momjian
docs comments: clarify why not to use UTF8 still in docs Back branches still are SGML. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3960fa5f6396865ded34d9276324e9a31857cff1 Modified Files -- doc/src/sgml/release.sgml | 7 --- 1 file changed, 4 in

pgsql: doc: Update limitations of partitions

2018-05-01 Thread Peter Eisentraut
doc: Update limitations of partitions David Rowley, Amit Langote Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5a6ab0a1b157a27da7160565ee2f1815e94a6122 Modified Files -- doc/src/sgml/ddl.sgml | 11 ++- 1 file changed, 2 insertions(+), 9 deletio