aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/be-secure-openssl.c8
-rw-r--r--src/backend/utils/adt/jsonpath.c2
-rw-r--r--src/backend/utils/adt/jsonpath_exec.c7
-rw-r--r--src/backend/utils/adt/jsonpath_gram.y4
-rw-r--r--src/test/regress/pg_regress.c8
5 files changed, 15 insertions, 14 deletions
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 4490516b9e2..c38a71df587 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -1287,24 +1287,22 @@ ssl_protocol_version_to_openssl(int v, const char *guc_name, int loglevel)
#ifdef TLS1_1_VERSION
return TLS1_1_VERSION;
#else
- goto error;
+ break;
#endif
case PG_TLS1_2_VERSION:
#ifdef TLS1_2_VERSION
return TLS1_2_VERSION;
#else
- goto error;
+ break;
#endif
case PG_TLS1_3_VERSION:
#ifdef TLS1_3_VERSION
return TLS1_3_VERSION;
#else
- goto error;
+ break;
#endif
}
-error:
- pg_attribute_unused();
ereport(loglevel,
(errmsg("%s setting %s not supported by this build",
guc_name,
diff --git a/src/backend/utils/adt/jsonpath.c b/src/backend/utils/adt/jsonpath.c
index fb9d85213d4..d53d6d33113 100644
--- a/src/backend/utils/adt/jsonpath.c
+++ b/src/backend/utils/adt/jsonpath.c
@@ -499,7 +499,7 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey,
case jpiNumeric:
appendStringInfoString(buf,
DatumGetCString(DirectFunctionCall1(numeric_out,
- PointerGetDatum(jspGetNumeric(v)))));
+ NumericGetDatum(jspGetNumeric(v)))));
break;
case jpiBool:
if (jspGetBool(v))
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index 074cea24ae3..ae61b8fa3e6 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -1742,8 +1742,7 @@ executeNumericItemMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
"be applied to a numeric value",
jspOperationName(jsp->type)))));
- datum = NumericGetDatum(jb->val.numeric);
- datum = DirectFunctionCall1(func, datum);
+ datum = DirectFunctionCall1(func, NumericGetDatum(jb->val.numeric));
if (!jspGetNext(jsp, &next) && !found)
return jperOk;
@@ -2109,8 +2108,8 @@ static int
compareNumeric(Numeric a, Numeric b)
{
return DatumGetInt32(DirectFunctionCall2(numeric_cmp,
- PointerGetDatum(a),
- PointerGetDatum(b)));
+ NumericGetDatum(a),
+ NumericGetDatum(b)));
}
static JsonbValue *
diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y
index 76155963fc6..1534b038dda 100644
--- a/src/backend/utils/adt/jsonpath_gram.y
+++ b/src/backend/utils/adt/jsonpath_gram.y
@@ -359,7 +359,9 @@ makeItemNumeric(JsonPathString *s)
v = makeItemType(jpiNumeric);
v->value.numeric =
DatumGetNumeric(DirectFunctionCall3(numeric_in,
- CStringGetDatum(s->val), 0, -1));
+ CStringGetDatum(s->val),
+ ObjectIdGetDatum(InvalidOid),
+ Int32GetDatum(-1)));
return v;
}
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 189abbbdf37..0902b1fa97a 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -881,7 +881,9 @@ initialize_environment(void)
load_resultmap();
}
-pg_attribute_unused()
+#ifdef ENABLE_SSPI
+
+/* support for config_sspi_auth() */
static const char *
fmtHba(const char *raw)
{
@@ -904,7 +906,6 @@ fmtHba(const char *raw)
return ret;
}
-#ifdef ENABLE_SSPI
/*
* Get account and domain/realm names for the current user. This is based on
* pg_SSPI_recvauth(). The returned strings use static storage.
@@ -1072,7 +1073,8 @@ config_sspi_auth(const char *pgdata)
accountname, domainname, fmtHba(sl->str)) >= 0);
CW(fclose(ident) == 0);
}
-#endif
+
+#endif /* ENABLE_SSPI */
/*
* Issue a command via psql, connecting to the specified database