On 04/11/2016 03:47 AM, Michael Paquier wrote:
On Mon, Apr 11, 2016 at 3:25 PM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
Now, I have produced two patches:
- 0001-Support-for-VS-2015-locale-hack.patch, which makes use of
__crt_locale_data_public in ucrt/corecrt.h. This is definitely an ugly
hack, though I am coming to think that this may be the approach that
would us the less harm, and that's closer to what is done for VS 2012
and 2013.
- 0001-Support-for-VS-2015-getlocaleinfoex.patch, which make use of
GetLocaleInfoEx, this requires us to lower a bit the support grid for
Windows, basically that's throwing support for XP if compilation is
done with VS 2015.
Based on my tests, both are working with short and long local names,
testing via initdb --locale.
The first patch is actually not what I wanted to send. Here are the
correct ones...




I think I prefer the less hacky solution.

Progress report:

1. My VS 2015 installations (I now have several) all generate solution file with:

   Microsoft Visual Studio Solution File, Format Version 12.00

so I propose to set that as the solution file version.

2. The logic in win32.h is a bit convoluted. I'm going to simplify it.

3. I'm going to define _WINSOCK_DEPRECATED_NO_WARNINGS to silence some compiler bleatings about the way we use the Winsock API

4. The compiler complains about one of Microsoft's own header files - essentially it dislikes the=is construct:

   typedef enum { ... };

It would be nice to make it shut up about it.

5. It also complains about us casting a pid_t to a HANDLE in pg_basebackup.c. Not sure what to do about that.

5. most importantly, on my Release/X64 build, I am getting a regression failure on contrib/seg. regression diffs attached. Until that's fixed this isn't going anywhere.

cheers

andrew


*** C:/prog/postgresql/contrib/seg/expected/seg.out     Wed Apr  6 12:18:10 2016
--- C:/prog/postgresql/contrib/seg/results/seg.out      Thu Apr 21 11:34:26 2016
***************
*** 444,450 ****
  SELECT '24 .. 33.20'::seg = '24 .. 33.21'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '24 .. 33.20'::seg != '24 .. 33.20'::seg AS bool;
--- 444,450 ----
  SELECT '24 .. 33.20'::seg = '24 .. 33.21'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '24 .. 33.20'::seg != '24 .. 33.20'::seg AS bool;
***************
*** 556,562 ****
  SELECT '1'::seg &< '0'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg &< '1'::seg AS bool;
--- 556,562 ----
  SELECT '1'::seg &< '0'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg &< '1'::seg AS bool;
***************
*** 574,580 ****
  SELECT '0 .. 1'::seg &< '0'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg &< '1'::seg AS bool;
--- 574,580 ----
  SELECT '0 .. 1'::seg &< '0'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg &< '1'::seg AS bool;
***************
*** 592,598 ****
  SELECT '0 .. 1'::seg &< '0 .. 0.5'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg &< '0 .. 1'::seg AS bool;
--- 592,598 ----
  SELECT '0 .. 1'::seg &< '0 .. 0.5'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg &< '0 .. 1'::seg AS bool;
***************
*** 624,630 ****
  SELECT '0'::seg &> '1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg &> '1'::seg AS bool;
--- 624,630 ----
  SELECT '0'::seg &> '1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg &> '1'::seg AS bool;
***************
*** 692,704 ****
  SELECT '1'::seg << '0'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg << '1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg << '2'::seg AS bool;
--- 692,704 ----
  SELECT '1'::seg << '0'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg << '1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg << '2'::seg AS bool;
***************
*** 710,722 ****
  SELECT '0 .. 1'::seg << '0'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '2'::seg AS bool;
--- 710,722 ----
  SELECT '0 .. 1'::seg << '0'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '2'::seg AS bool;
***************
*** 728,752 ****
  SELECT '0 .. 1'::seg << '0 .. 0.5'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '0 .. 2'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '1 .. 2'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg << '2 .. 3'::seg AS bool;
--- 728,752 ----
  SELECT '0 .. 1'::seg << '0 .. 0.5'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '0 .. 2'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '1 .. 2'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg << '2 .. 3'::seg AS bool;
***************
*** 760,772 ****
  SELECT '0'::seg >> '1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg >> '1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '2'::seg >> '1'::seg AS bool;
--- 760,772 ----
  SELECT '0'::seg >> '1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg >> '1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '2'::seg >> '1'::seg AS bool;
***************
*** 778,790 ****
  SELECT '0'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '2'::seg >> '0 .. 1'::seg AS bool;
--- 778,790 ----
  SELECT '0'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '2'::seg >> '0 .. 1'::seg AS bool;
***************
*** 796,820 ****
  SELECT '0 .. 0.5'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 1'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '0 .. 2'::seg >> '0 .. 2'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '1 .. 2'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  f
  (1 row)
  
  SELECT '2 .. 3'::seg >> '0 .. 1'::seg AS bool;
--- 796,820 ----
  SELECT '0 .. 0.5'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 1'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '0 .. 2'::seg >> '0 .. 2'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '1 .. 2'::seg >> '0 .. 1'::seg AS bool;
   bool 
  ------
!  t
  (1 row)
  
  SELECT '2 .. 3'::seg >> '0 .. 1'::seg AS bool;
***************
*** 931,1081 ****
  -- Test sorting
  SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
          s        
! -----------------
   .. 4.0e1
!  .. >8.2e1
!  .. 9.0e1
!  <1.0 .. >13.0
!  1.3 .. 12.0
!  2.0 .. 11.5
!  2.1 .. 11.8
!  <2.3 ..
!  >2.3 ..
!  2.4 .. 11.3
!  2.5 .. 11.5
!  2.5 .. 11.8
!  2.6 ..
!  2.7 .. 12.0
!  <3.0 ..
!  3 .. 5.8e1
!  3.1 .. 11.5
!  3.5 .. 11.5
!  3.5 .. 12.2
!  <4.0 .. >1.2e1
!  <4.0 ..
!  4 .. 1.2e1
!  4.0 .. 11.7
!  4.0 .. 12.5
!  4.0 .. 13.0
!  4.0 .. 6.0e1
!  4.0 ..
!  4.2 .. 11.5
!  4.2 .. 11.7
!  <4.5 .. >1.2e1
!  4.5 .. 11.5
!  4.5 .. <1.2e1
!  4.5 .. >1.2e1
!  4.5 .. 12.5
!  4.5 .. 1.15e2
!  4.7 .. 11.8
!  4.8 .. 11.5
!  4.8 .. 11.6
!  4.8 .. 12.5
!  4.8 ..
!  4.9 .. >1.2e1
!  4.9 ..
!  5 .. 11.5
!  5 .. 1.2e1
!  5 .. 3.0e1
!  5.0 .. 11.4
!  5.0 .. 11.5
!  5.0 .. 11.6
!  5.0 .. 11.7
!  5.0 .. 12.0
!  5.0 .. >12.0
!  5.0 .. >1.2e1
!  5.2 .. 11.5
!  5.2 .. >1.2e1
!  5.25 .. >1.2e1
!  5.3 .. 11.5
!  5.3 .. 1.3e1
!  5.3 .. >9.0e1
!  5.3 ..
!  5.4 ..
!  5.5 .. 11.5
!  5.5 .. 11.7
!  5.5 .. 1.2e1
!  5.5 .. >1.2e1
!  5.5 .. 12.5
!  5.5 .. 13.5
!  5.5 ..
!  >5.5 ..
!  5.7 ..
!  5.9 ..
!  6 .. 11.5
!  6 .. >1.2e1
!  6.0 .. 11.5
!  6.0 .. 1.3e1
!  >6.0 .. <11.5
!  6.1 .. >1.2e1
!  6.1 ..
!  6.2 .. >11.5
!  6.3 ..
!  6.5 .. 11.5
!  6.5 .. 12.0
!  6.5 .. >12.0
!  6.5 ..
!  6.6 ..
!  6.7 .. 11.5
!  6.7 ..
!  6.75 ..
!  6.8 ..
!  6.9 .. 12.2
!  6.9 .. >9.0e1
!  6.9 ..
!  <7.0 .. >11.5
!  7.0 .. 11.5
!  7.0 .. >11.5
!  7.0 ..
!  >7.15 ..
!  7.2 .. 13.5
!  7.3 .. >9.0e1
!  7.3 ..
!  >7.3 ..
!  7.4 .. 12.1
!  7.4 ..
!  7.5 .. 11.5
!  7.5 .. 12.0
!  7.5 ..
!  7.7 .. 11.5
!  7.7 ..
!  7.75 ..
!  8.0 .. 11.7
!  8.0 .. 12.0
!  8.0 .. >13.0
!  8.2 ..
!  8.3 ..
!  8.5 .. >11.5
!  8.5 .. 12.5
!  8.5 ..
!  8.6 .. >9.9e1
!  8.7 .. 11.3
!  8.7 .. 11.7
!  8.9 .. 11.5
!  9 .. >1.2e1
!  9.0 .. 11.3
!  9.0 .. 11.5
!  9.0 .. 1.2e1
!  9.0 ..
!  9.2 .. 1.2e1
!  9.4 .. 12.2
!  <9.5 .. 1.2e1
!  <9.5 .. >12.2
!  9.5 ..
!  9.6 .. 11.5
!  9.7 .. 11.5
!  9.7 .. >1.2e1
!  9.8 .. >12.5
!  <1.0e1 .. >11.6
!  10.0 .. 11.5
!  10.0 .. 12.5
!  10.0 .. >12.5
!  10.2 .. 11.8
!  <10.5 .. 11.5
!  10.5 .. 11.5
!  10.5 .. <13.5
!  10.7 .. 12.3
! (143 rows)
  
  -- Test functions
  SELECT seg_lower(s), seg_center(s), seg_upper(s)
--- 931,939 ----
  -- Test sorting
  SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
      s     
! ----------
   .. 4.0e1
! (1 row)
  
  -- Test functions
  SELECT seg_lower(s), seg_center(s), seg_upper(s)

======================================================================

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to