aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/executor/nodeBitmapHeapscan.c4
-rw-r--r--src/backend/utils/adt/formatting.c12
-rw-r--r--src/backend/utils/adt/varlena.c4
3 files changed, 20 insertions, 0 deletions
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 4a8920e6ce8..cb780b665c4 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -66,7 +66,9 @@ BitmapHeapNext(BitmapHeapScanState *node)
TIDBitmap *tbm;
TBMIterator *tbmiterator;
TBMIterateResult *tbmres;
+#ifdef USE_PREFETCH
TBMIterator *prefetch_iterator;
+#endif
OffsetNumber targoffset;
TupleTableSlot *slot;
@@ -79,7 +81,9 @@ BitmapHeapNext(BitmapHeapScanState *node)
tbm = node->tbm;
tbmiterator = node->tbmiterator;
tbmres = node->tbmres;
+#ifdef USE_PREFETCH
prefetch_iterator = node->prefetch_iterator;
+#endif
/*
* If we haven't yet performed the underlying index scan, do it, and begin
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index a7000250b03..be0966ca90e 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1554,7 +1554,9 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
#endif /* USE_WIDE_UPPER_LOWER */
else
{
+#ifdef HAVE_LOCALE_T
pg_locale_t mylocale = 0;
+#endif
char *p;
if (collid != DEFAULT_COLLATION_OID)
@@ -1570,7 +1572,9 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
errmsg("could not determine which collation to use for lower() function"),
errhint("Use the COLLATE clause to set the collation explicitly.")));
}
+#ifdef HAVE_LOCALE_T
mylocale = pg_newlocale_from_collation(collid);
+#endif
}
result = pnstrdup(buff, nbytes);
@@ -1675,7 +1679,9 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
#endif /* USE_WIDE_UPPER_LOWER */
else
{
+#ifdef HAVE_LOCALE_T
pg_locale_t mylocale = 0;
+#endif
char *p;
if (collid != DEFAULT_COLLATION_OID)
@@ -1691,7 +1697,9 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
errmsg("could not determine which collation to use for upper() function"),
errhint("Use the COLLATE clause to set the collation explicitly.")));
}
+#ifdef HAVE_LOCALE_T
mylocale = pg_newlocale_from_collation(collid);
+#endif
}
result = pnstrdup(buff, nbytes);
@@ -1820,7 +1828,9 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
#endif /* USE_WIDE_UPPER_LOWER */
else
{
+#ifdef HAVE_LOCALE_T
pg_locale_t mylocale = 0;
+#endif
char *p;
if (collid != DEFAULT_COLLATION_OID)
@@ -1836,7 +1846,9 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
errmsg("could not determine which collation to use for initcap() function"),
errhint("Use the COLLATE clause to set the collation explicitly.")));
}
+#ifdef HAVE_LOCALE_T
mylocale = pg_newlocale_from_collation(collid);
+#endif
}
result = pnstrdup(buff, nbytes);
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index a406794e4d0..f1d582f4b24 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -1299,7 +1299,9 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
char a2buf[STACKBUFLEN];
char *a1p,
*a2p;
+#ifdef HAVE_LOCALE_T
pg_locale_t mylocale = 0;
+#endif
if (collid != DEFAULT_COLLATION_OID)
{
@@ -1314,7 +1316,9 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
errmsg("could not determine which collation to use for string comparison"),
errhint("Use the COLLATE clause to set the collation explicitly.")));
}
+#ifdef HAVE_LOCALE_T
mylocale = pg_newlocale_from_collation(collid);
+#endif
}
#ifdef WIN32