summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorMichael Paquier2022-07-14 02:22:49 +0000
committerMichael Paquier2022-07-14 02:22:49 +0000
commit6203583b72b58272010f8d06999811ff39922acf (patch)
tree6049f2ba855246e2200904ece3dd16cdb3e5dd0f /src/backend
parent4ca9985957881c223b4802d309c0bbbcf8acd1c1 (diff)
Remove support for Visual Studio 2013
No members of the buildfarm are using this version of Visual Studio, resulting in all the code cleaned up here as being mostly dead, and VS2017 is the oldest version still supported. More versions could be cut, but the gain would be minimal, while removing only VS2013 has the advantage to remove from the core code all the dependencies on the value defined by _MSC_VER, where compatibility tweaks have accumulated across the years mostly around locales and strtof(), so that's a nice isolated cleanup. Note that this commit additionally allows a revert of 3154e16. The versions of Visual Studio now supported range from 2015 to 2022. Author: Michael Paquier Reviewed-by: Juan José Santamaría Flecha, Tom Lane, Thomas Munro, Justin Pryzby Discussion: https://postgr.es/m/YoH2IMtxcS3ncWn+@paquier.xyz
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/main/main.c5
-rw-r--r--src/backend/optimizer/path/costsize.c4
-rw-r--r--src/backend/utils/adt/float.c6
-rw-r--r--src/backend/utils/adt/pg_locale.c40
4 files changed, 2 insertions, 53 deletions
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index dd82722ee31..bb782fa1ec6 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -30,11 +30,6 @@
#include <sys/param.h>
#endif
-#if defined(_M_AMD64) && _MSC_VER == 1800
-#include <math.h>
-#include <versionhelpers.h>
-#endif
-
#include "bootstrap/bootstrap.h"
#include "common/username.h"
#include "port/atomics.h"
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index fcc26b01a4f..5e5732f6e12 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -5445,10 +5445,8 @@ calc_joinrel_size_estimate(PlannerInfo *root,
double outer_rows,
double inner_rows,
SpecialJoinInfo *sjinfo,
- List *restrictlist_in)
+ List *restrictlist)
{
- /* This apparently-useless variable dodges a compiler bug in VS2013: */
- List *restrictlist = restrictlist_in;
JoinType jointype = sjinfo->jointype;
Selectivity fkselec;
Selectivity jselec;
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 63bb0f22772..fc8f39a7a98 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -249,13 +249,9 @@ float4in(PG_FUNCTION_ARGS)
* precision). We'd prefer not to throw error for that, so try to
* detect whether it's a "real" out-of-range condition by checking
* to see if the result is zero or huge.
- *
- * Use isinf() rather than HUGE_VALF on VS2013 because it
- * generates a spurious overflow warning for -HUGE_VALF. Also use
- * isinf() if HUGE_VALF is missing.
*/
if (val == 0.0 ||
-#if !defined(HUGE_VALF) || (defined(_MSC_VER) && (_MSC_VER < 1900))
+#if !defined(HUGE_VALF)
isinf(val)
#else
(val >= HUGE_VALF || val <= -HUGE_VALF)
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 5cf5dd5f87d..607a4b73407 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -950,7 +950,6 @@ cache_locale_time(void)
* [2] https://docs.microsoft.com/en-us/windows/win32/intl/locale-names
*/
-#if _MSC_VER >= 1900
/*
* Callback function for EnumSystemLocalesEx() in get_iso_localename().
*
@@ -1100,7 +1099,6 @@ get_iso_localename(const char *winlocname)
return NULL;
}
-#endif /* _MSC_VER >= 1900 */
static char *
IsoLocaleName(const char *winlocname)
@@ -1115,46 +1113,8 @@ IsoLocaleName(const char *winlocname)
return iso_lc_messages;
}
else
- {
-#if (_MSC_VER >= 1900) /* Visual Studio 2015 or later */
return get_iso_localename(winlocname);
-#else
- _locale_t loct;
-
- loct = _create_locale(LC_CTYPE, winlocname);
- if (loct != NULL)
- {
- size_t rc;
- char *hyphen;
-
- /* Locale names use only ASCII, any conversion locale suffices. */
- rc = wchar2char(iso_lc_messages, loct->locinfo->locale_name[LC_CTYPE],
- sizeof(iso_lc_messages), NULL);
- _free_locale(loct);
- if (rc == -1 || rc == sizeof(iso_lc_messages))
- return NULL;
- /*
- * Since the message catalogs sit on a case-insensitive
- * filesystem, we need not standardize letter case here. So long
- * as we do not ship message catalogs for which it would matter,
- * we also need not translate the script/variant portion, e.g.
- * uz-Cyrl-UZ to uz_UZ@cyrillic. Simply replace the hyphen with
- * an underscore.
- *
- * Note that the locale name can be less-specific than the value
- * we would derive under earlier Visual Studio releases. For
- * example, French_France.1252 yields just "fr". This does not
- * affect any of the country-specific message catalogs available
- * as of this writing (pt_BR, zh_CN, zh_TW).
- */
- hyphen = strchr(iso_lc_messages, '-');
- if (hyphen)
- *hyphen = '_';
- return iso_lc_messages;
- }
-#endif /* Visual Studio 2015 or later */
- }
#endif /* defined(_MSC_VER) */
return NULL; /* Not supported on this version of msvc/mingw */
}