Re: VS 2015 support in src/tools/msvc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Christian Ullrich <chris(at)chrullrich(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: 2016-04-22 04:30:56
Message-ID: 4034.1461299456@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 04/21/2016 05:15 PM, Tom Lane wrote:
>> Do the other contrib modules all pass? I can't recall if seg was the
>> only one we'd left like this.

> Only seg fails.

As a crosscheck, I put some code into fmgr_c_validator() to log a message
when creating a V0 function with a pass-by-val return type. (Pass-by-ref
is no problem, according to my hypothesis, since it necessarily means
the C function returns a pointer.) I get these hits in core + contrib
regression tests:

core:
LOG: version-0 function widget_in returns type widget
LOG: version-0 function oldstyle_length returns type integer

contrib:
LOG: version-0 function seg_over_left returns type boolean
LOG: version-0 function seg_over_right returns type boolean
LOG: version-0 function seg_left returns type boolean
LOG: version-0 function seg_right returns type boolean
LOG: version-0 function seg_lt returns type boolean
LOG: version-0 function seg_le returns type boolean
LOG: version-0 function seg_gt returns type boolean
LOG: version-0 function seg_ge returns type boolean
LOG: version-0 function seg_contains returns type boolean
LOG: version-0 function seg_contained returns type boolean
LOG: version-0 function seg_overlap returns type boolean
LOG: version-0 function seg_same returns type boolean
LOG: version-0 function seg_different returns type boolean
LOG: version-0 function seg_cmp returns type integer
LOG: version-0 function gseg_consistent returns type boolean
LOG: version-0 function gseg_compress returns type internal
LOG: version-0 function gseg_decompress returns type internal
LOG: version-0 function gseg_penalty returns type internal
LOG: version-0 function gseg_picksplit returns type internal
LOG: version-0 function gseg_same returns type internal

The widget_in gripe is a false positive, caused by the fact that we don't
know the properties of type widget when widget_in is declared. We also
need not worry about the functions that return "internal", since that's
defined to be pointer-sized.

If we assume that oldstyle functions returning integer are still okay,
which the success of the regression test case involving oldstyle_length()
seems to prove, then indeed seg's bool-returning functions are the only
hazard.

Note though that this test fails to cover any contrib modules that
lack regression tests, since they wouldn't have gotten loaded by
"make installcheck".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-04-22 05:21:03 Re: Fix of doc for synchronous_standby_names.
Previous Message Andrew Dunstan 2016-04-22 03:51:27 Re: VS 2015 support in src/tools/msvc