From f451a77403fa6bd7f07fe75ce27f0e0ec107e71a Mon Sep 17 00:00:00 2001
From: Alexandre Felipe <o.alexandre.felipe@gmail.com>
Date: Wed, 11 Feb 2026 20:42:25 +0000
Subject: [PATCH 2/3] SLOPE Builtin support

This adds slope information to several builtin functions.
type casting, addition, subtraction, common mathematical functions,
e.g. atan, sinh, log, exp, erf, etc. And some date manipulation function.

This may not be complete, but already covers obvious cases.

e.g. SELECT created_at::date, count(1) FROM tasks GROUP BY 1;

can use an index on created_at, to count tasks per day.
and much more.
---
 src/backend/utils/adt/misc.c     |  92 ++++++
 src/include/catalog/catversion.h |   2 +-
 src/include/catalog/pg_proc.dat  | 522 ++++++++++++++++++-------------
 3 files changed, 401 insertions(+), 215 deletions(-)

diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index 29ef800d992..7b2a17ee756 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -32,6 +32,7 @@
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "nodes/miscnodes.h"
+#include "nodes/supportnodes.h"
 #include "parser/parse_type.h"
 #include "parser/scansup.h"
 #include "pgstat.h"
@@ -1095,3 +1096,94 @@ any_value_transfn(PG_FUNCTION_ARGS)
 {
 	PG_RETURN_DATUM(PG_GETARG_DATUM(0));
 }
+
+/*
+ * monotonic_slope_support
+ *		Generic helper for prosupport functions that declare monotonic slopes.
+ *
+ * If the request is a SupportRequestMonotonic, fills in nslopes and slopes
+ * and returns the request pointer.  Otherwise returns NULL.
+ */
+static Datum
+monotonic_slope_support(Node *rawreq, int nslopes,
+						const MonotonicFunction *slopes)
+{
+	if (IsA(rawreq, SupportRequestMonotonic))
+	{
+		SupportRequestMonotonic *req = (SupportRequestMonotonic *) rawreq;
+
+		req->nslopes = nslopes;
+		req->slopes = slopes;
+		return PointerGetDatum(req);
+	}
+
+	return PointerGetDatum(NULL);
+}
+
+/*
+ * arg0_asc_slope_support
+ *		Prosupport: f(x, ...) is monotonically increasing in x.
+ */
+Datum
+arg0_asc_slope_support(PG_FUNCTION_ARGS)
+{
+	static const MonotonicFunction pattern[1] = {MONOTONICFUNC_INCREASING};
+
+	return monotonic_slope_support((Node *) PG_GETARG_POINTER(0),
+								   lengthof(pattern), pattern);
+}
+
+/*
+ * arg0_desc_slope_support
+ *		Prosupport: f(x, ...) is monotonically decreasing in x.
+ */
+Datum
+arg0_desc_slope_support(PG_FUNCTION_ARGS)
+{
+	static const MonotonicFunction pattern[1] = {MONOTONICFUNC_DECREASING};
+
+	return monotonic_slope_support((Node *) PG_GETARG_POINTER(0),
+								   lengthof(pattern), pattern);
+}
+
+/*
+ * arg1_asc_slope_support
+ *		Prosupport: f(a, x, ...) is monotonically increasing in x.
+ */
+Datum
+arg1_asc_slope_support(PG_FUNCTION_ARGS)
+{
+	static const MonotonicFunction pattern[2] = {MONOTONICFUNC_NONE,
+												 MONOTONICFUNC_INCREASING};
+
+	return monotonic_slope_support((Node *) PG_GETARG_POINTER(0),
+								   lengthof(pattern), pattern);
+}
+
+/*
+ * diff_slope_support
+ *		Prosupport: f(x, y) = x - y is increasing in x, decreasing in y.
+ */
+Datum
+diff_slope_support(PG_FUNCTION_ARGS)
+{
+	static const MonotonicFunction pattern[2] = {MONOTONICFUNC_INCREASING,
+												 MONOTONICFUNC_DECREASING};
+
+	return monotonic_slope_support((Node *) PG_GETARG_POINTER(0),
+								   lengthof(pattern), pattern);
+}
+
+/*
+ * addition_slope_support
+ *		Prosupport: f(x, y) = x + y is increasing in both x and y.
+ */
+Datum
+addition_slope_support(PG_FUNCTION_ARGS)
+{
+	static const MonotonicFunction pattern[2] = {MONOTONICFUNC_INCREASING,
+												 MONOTONICFUNC_INCREASING};
+
+	return monotonic_slope_support((Node *) PG_GETARG_POINTER(0),
+								   lengthof(pattern), pattern);
+}
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 4d9ccc5789c..ef0a3b1ff66 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
  */
 
 /*							yyyymmddN */
-#define CATALOG_VERSION_NO	202603241
+#define CATALOG_VERSION_NO	202604251
 
 #endif
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 0118e970dda..aafb6de9338 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -513,29 +513,29 @@
   proname => 'int42div', prorettype => 'int4', proargtypes => 'int4 int2',
   prosrc => 'int42div' },
 { oid => '176',
-  proname => 'int2pl', prorettype => 'int2', proargtypes => 'int2 int2',
-  prosrc => 'int2pl' },
+  proname => 'int2pl', prosupport => 'addition_slope_support',
+  prorettype => 'int2', proargtypes => 'int2 int2', prosrc => 'int2pl' },
 { oid => '177',
-  proname => 'int4pl', prorettype => 'int4', proargtypes => 'int4 int4',
-  prosrc => 'int4pl' },
+  proname => 'int4pl', prosupport => 'addition_slope_support',
+  prorettype => 'int4', proargtypes => 'int4 int4', prosrc => 'int4pl' },
 { oid => '178',
-  proname => 'int24pl', prorettype => 'int4', proargtypes => 'int2 int4',
-  prosrc => 'int24pl' },
+  proname => 'int24pl', prosupport => 'addition_slope_support',
+  prorettype => 'int4', proargtypes => 'int2 int4', prosrc => 'int24pl' },
 { oid => '179',
-  proname => 'int42pl', prorettype => 'int4', proargtypes => 'int4 int2',
-  prosrc => 'int42pl' },
+  proname => 'int42pl', prosupport => 'addition_slope_support',
+  prorettype => 'int4', proargtypes => 'int4 int2', prosrc => 'int42pl' },
 { oid => '180',
-  proname => 'int2mi', prorettype => 'int2', proargtypes => 'int2 int2',
-  prosrc => 'int2mi' },
+  proname => 'int2mi', prosupport => 'diff_slope_support',
+  prorettype => 'int2', proargtypes => 'int2 int2', prosrc => 'int2mi' },
 { oid => '181',
-  proname => 'int4mi', prorettype => 'int4', proargtypes => 'int4 int4',
-  prosrc => 'int4mi' },
+  proname => 'int4mi', prosupport => 'diff_slope_support',
+  prorettype => 'int4', proargtypes => 'int4 int4', prosrc => 'int4mi' },
 { oid => '182',
-  proname => 'int24mi', prorettype => 'int4', proargtypes => 'int2 int4',
-  prosrc => 'int24mi' },
+  proname => 'int24mi', prosupport => 'diff_slope_support',
+  prorettype => 'int4', proargtypes => 'int2 int4', prosrc => 'int24mi' },
 { oid => '183',
-  proname => 'int42mi', prorettype => 'int4', proargtypes => 'int4 int2',
-  prosrc => 'int42mi' },
+  proname => 'int42mi', prosupport => 'diff_slope_support',
+  prorettype => 'int4', proargtypes => 'int4 int2', prosrc => 'int42mi' },
 { oid => '184',
   proname => 'oideq', proleakproof => 't', prorettype => 'bool',
   proargtypes => 'oid oid', prosrc => 'oideq' },
@@ -596,13 +596,31 @@
   proname => 'float4div', prorettype => 'float4',
   proargtypes => 'float4 float4', prosrc => 'float4div' },
 { oid => '204',
-  proname => 'float4pl', prorettype => 'float4', proargtypes => 'float4 float4',
-  prosrc => 'float4pl' },
+  proname => 'float4pl', prosupport => 'addition_slope_support',
+  prorettype => 'float4', proargtypes => 'float4 float4', prosrc => 'float4pl' },
 { oid => '205',
-  proname => 'float4mi', prorettype => 'float4', proargtypes => 'float4 float4',
-  prosrc => 'float4mi' },
+  proname => 'float4mi', prosupport => 'diff_slope_support',
+  prorettype => 'float4', proargtypes => 'float4 float4', prosrc => 'float4mi' },
+# monotonic support functions for scalar function ordering optimization
+{ oid => '9954', descr => 'planner support for ascending slope in arg 0',
+  proname => 'arg0_asc_slope_support', prorettype => 'internal',
+  proargtypes => 'internal', prosrc => 'arg0_asc_slope_support' },
+{ oid => '9955', descr => 'planner support for descending slope in arg 0',
+  proname => 'arg0_desc_slope_support', prorettype => 'internal',
+  proargtypes => 'internal', prosrc => 'arg0_desc_slope_support' },
+{ oid => '9956', descr => 'planner support for ascending slope in arg 1',
+  proname => 'arg1_asc_slope_support', prorettype => 'internal',
+  proargtypes => 'internal', prosrc => 'arg1_asc_slope_support' },
+{ oid => '9957', descr => 'planner support for diff slope (asc arg0, desc arg1)',
+  proname => 'diff_slope_support', prorettype => 'internal',
+  proargtypes => 'internal', prosrc => 'diff_slope_support' },
+{ oid => '9958', descr => 'planner support for addition slope (asc both args)',
+  proname => 'addition_slope_support', prorettype => 'internal',
+  proargtypes => 'internal', prosrc => 'addition_slope_support' },
+
 { oid => '206',
-  proname => 'float4um', prorettype => 'float4', proargtypes => 'float4',
+  proname => 'float4um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'float4', proargtypes => 'float4',
   prosrc => 'float4um' },
 { oid => '207',
   proname => 'float4abs', prorettype => 'float4', proargtypes => 'float4',
@@ -618,10 +636,12 @@
   proargtypes => 'float4 float4', prosrc => 'float4smaller' },
 
 { oid => '212',
-  proname => 'int4um', prorettype => 'int4', proargtypes => 'int4',
+  proname => 'int4um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'int4', proargtypes => 'int4',
   prosrc => 'int4um' },
 { oid => '213',
-  proname => 'int2um', prorettype => 'int2', proargtypes => 'int2',
+  proname => 'int2um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'int2', proargtypes => 'int2',
   prosrc => 'int2um' },
 
 { oid => '214', descr => 'I/O',
@@ -637,13 +657,14 @@
   proname => 'float8div', prorettype => 'float8',
   proargtypes => 'float8 float8', prosrc => 'float8div' },
 { oid => '218',
-  proname => 'float8pl', prorettype => 'float8', proargtypes => 'float8 float8',
-  prosrc => 'float8pl' },
+  proname => 'float8pl', prosupport => 'addition_slope_support',
+  prorettype => 'float8', proargtypes => 'float8 float8', prosrc => 'float8pl' },
 { oid => '219',
-  proname => 'float8mi', prorettype => 'float8', proargtypes => 'float8 float8',
-  prosrc => 'float8mi' },
+  proname => 'float8mi', prosupport => 'diff_slope_support',
+  prorettype => 'float8', proargtypes => 'float8 float8', prosrc => 'float8mi' },
 { oid => '220',
-  proname => 'float8um', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'float8um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'float8um' },
 { oid => '221',
   proname => 'float8abs', prorettype => 'float8', proargtypes => 'float8',
@@ -675,13 +696,16 @@
   proname => 'dtrunc', prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dtrunc' },
 { oid => '2308', descr => 'nearest integer >= value',
-  proname => 'ceil', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'ceil', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dceil' },
 { oid => '2320', descr => 'nearest integer >= value',
-  proname => 'ceiling', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'ceiling', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dceil' },
 { oid => '2309', descr => 'nearest integer <= value',
-  proname => 'floor', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'floor', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dfloor' },
 { oid => '2310', descr => 'sign of value',
   proname => 'sign', prorettype => 'float8', proargtypes => 'float8',
@@ -702,16 +726,20 @@
   proname => 'dlog1', prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dlog1' },
 { oid => '235', descr => 'convert int2 to float8',
-  proname => 'float8', proleakproof => 't', prorettype => 'float8',
+  proname => 'float8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float8',
   proargtypes => 'int2', prosrc => 'i2tod' },
 { oid => '236', descr => 'convert int2 to float4',
-  proname => 'float4', proleakproof => 't', prorettype => 'float4',
+  proname => 'float4', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float4',
   proargtypes => 'int2', prosrc => 'i2tof' },
 { oid => '237', descr => 'convert float8 to int2',
-  proname => 'int2', prorettype => 'int2', proargtypes => 'float8',
+  proname => 'int2', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int2', proargtypes => 'float8',
   prosrc => 'dtoi2' },
 { oid => '238', descr => 'convert float4 to int2',
-  proname => 'int2', prorettype => 'int2', proargtypes => 'float4',
+  proname => 'int2', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int2', proargtypes => 'float4',
   prosrc => 'ftoi2' },
 { oid => '239',
   proname => 'line_distance', prorettype => 'float8',
@@ -783,11 +811,11 @@
   proname => 'float48div', prorettype => 'float8',
   proargtypes => 'float4 float8', prosrc => 'float48div' },
 { oid => '281',
-  proname => 'float48pl', prorettype => 'float8',
-  proargtypes => 'float4 float8', prosrc => 'float48pl' },
+  proname => 'float48pl', prosupport => 'addition_slope_support',
+  prorettype => 'float8', proargtypes => 'float4 float8', prosrc => 'float48pl' },
 { oid => '282',
-  proname => 'float48mi', prorettype => 'float8',
-  proargtypes => 'float4 float8', prosrc => 'float48mi' },
+  proname => 'float48mi', prosupport => 'diff_slope_support',
+  prorettype => 'float8', proargtypes => 'float4 float8', prosrc => 'float48mi' },
 { oid => '283',
   proname => 'float84mul', prorettype => 'float8',
   proargtypes => 'float8 float4', prosrc => 'float84mul' },
@@ -795,11 +823,11 @@
   proname => 'float84div', prorettype => 'float8',
   proargtypes => 'float8 float4', prosrc => 'float84div' },
 { oid => '285',
-  proname => 'float84pl', prorettype => 'float8',
-  proargtypes => 'float8 float4', prosrc => 'float84pl' },
+  proname => 'float84pl', prosupport => 'addition_slope_support',
+  prorettype => 'float8', proargtypes => 'float8 float4', prosrc => 'float84pl' },
 { oid => '286',
-  proname => 'float84mi', prorettype => 'float8',
-  proargtypes => 'float8 float4', prosrc => 'float84mi' },
+  proname => 'float84mi', prosupport => 'diff_slope_support',
+  prorettype => 'float8', proargtypes => 'float8 float4', prosrc => 'float84mi' },
 
 { oid => '287',
   proname => 'float4eq', proleakproof => 't', prorettype => 'bool',
@@ -883,28 +911,36 @@
   proargtypes => 'float8 float8 float8 int4', prosrc => 'width_bucket_float8' },
 
 { oid => '311', descr => 'convert float4 to float8',
-  proname => 'float8', proleakproof => 't', prorettype => 'float8',
+  proname => 'float8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float8',
   proargtypes => 'float4', prosrc => 'ftod' },
 { oid => '312', descr => 'convert float8 to float4',
-  proname => 'float4', prorettype => 'float4', proargtypes => 'float8',
+  proname => 'float4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float4', proargtypes => 'float8',
   prosrc => 'dtof' },
 { oid => '313', descr => 'convert int2 to int4',
-  proname => 'int4', proleakproof => 't', prorettype => 'int4',
+  proname => 'int4', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'int4',
   proargtypes => 'int2', prosrc => 'i2toi4' },
 { oid => '314', descr => 'convert int4 to int2',
-  proname => 'int2', prorettype => 'int2', proargtypes => 'int4',
+  proname => 'int2', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int2', proargtypes => 'int4',
   prosrc => 'i4toi2' },
 { oid => '316', descr => 'convert int4 to float8',
-  proname => 'float8', proleakproof => 't', prorettype => 'float8',
+  proname => 'float8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float8',
   proargtypes => 'int4', prosrc => 'i4tod' },
 { oid => '317', descr => 'convert float8 to int4',
-  proname => 'int4', prorettype => 'int4', proargtypes => 'float8',
+  proname => 'int4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int4', proargtypes => 'float8',
   prosrc => 'dtoi4' },
 { oid => '318', descr => 'convert int4 to float4',
-  proname => 'float4', proleakproof => 't', prorettype => 'float4',
+  proname => 'float4', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float4',
   proargtypes => 'int4', prosrc => 'i4tof' },
 { oid => '319', descr => 'convert float4 to int4',
-  proname => 'int4', prorettype => 'int4', proargtypes => 'float4',
+  proname => 'int4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int4', proargtypes => 'float4',
   prosrc => 'ftoi4' },
 
 # Table access method handlers
@@ -1378,14 +1414,15 @@
   proname => 'int8out', prorettype => 'cstring', proargtypes => 'int8',
   prosrc => 'int8out' },
 { oid => '462',
-  proname => 'int8um', prorettype => 'int8', proargtypes => 'int8',
+  proname => 'int8um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'int8', proargtypes => 'int8',
   prosrc => 'int8um' },
 { oid => '463',
-  proname => 'int8pl', prorettype => 'int8', proargtypes => 'int8 int8',
-  prosrc => 'int8pl' },
+  proname => 'int8pl', prosupport => 'addition_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int8', prosrc => 'int8pl' },
 { oid => '464',
-  proname => 'int8mi', prorettype => 'int8', proargtypes => 'int8 int8',
-  prosrc => 'int8mi' },
+  proname => 'int8mi', prosupport => 'diff_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int8', prosrc => 'int8mi' },
 { oid => '465',
   proname => 'int8mul', prorettype => 'int8', proargtypes => 'int8 int8',
   prosrc => 'int8mul' },
@@ -1431,16 +1468,20 @@
   proargtypes => 'int8 int4', prosrc => 'int84ge' },
 
 { oid => '480', descr => 'convert int8 to int4',
-  proname => 'int4', prorettype => 'int4', proargtypes => 'int8',
+  proname => 'int4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int4', proargtypes => 'int8',
   prosrc => 'int84' },
 { oid => '481', descr => 'convert int4 to int8',
-  proname => 'int8', proleakproof => 't', prorettype => 'int8',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'int8',
   proargtypes => 'int4', prosrc => 'int48' },
 { oid => '482', descr => 'convert int8 to float8',
-  proname => 'float8', proleakproof => 't', prorettype => 'float8',
+  proname => 'float8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float8',
   proargtypes => 'int8', prosrc => 'i8tod' },
 { oid => '483', descr => 'convert float8 to int8',
-  proname => 'int8', prorettype => 'int8', proargtypes => 'float8',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int8', proargtypes => 'float8',
   prosrc => 'dtoi8' },
 
 # OIDS 500 - 599
@@ -1455,17 +1496,21 @@
   proargtypes => 'anyarray int8', prosrc => 'hash_array_extended' },
 
 { oid => '652', descr => 'convert int8 to float4',
-  proname => 'float4', proleakproof => 't', prorettype => 'float4',
+  proname => 'float4', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'float4',
   proargtypes => 'int8', prosrc => 'i8tof' },
 { oid => '653', descr => 'convert float4 to int8',
-  proname => 'int8', prorettype => 'int8', proargtypes => 'float4',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int8', proargtypes => 'float4',
   prosrc => 'ftoi8' },
 
 { oid => '714', descr => 'convert int8 to int2',
-  proname => 'int2', prorettype => 'int2', proargtypes => 'int8',
+  proname => 'int2', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int2', proargtypes => 'int8',
   prosrc => 'int82' },
 { oid => '754', descr => 'convert int2 to int8',
-  proname => 'int8', proleakproof => 't', prorettype => 'int8',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'int8',
   proargtypes => 'int2', prosrc => 'int28' },
 
 { oid => '655',
@@ -1973,11 +2018,11 @@
   proname => 'cash_ge', proleakproof => 't', prorettype => 'bool',
   proargtypes => 'money money', prosrc => 'cash_ge' },
 { oid => '894',
-  proname => 'cash_pl', prorettype => 'money', proargtypes => 'money money',
-  prosrc => 'cash_pl' },
+  proname => 'cash_pl', prosupport => 'addition_slope_support',
+  prorettype => 'money', proargtypes => 'money money', prosrc => 'cash_pl' },
 { oid => '895',
-  proname => 'cash_mi', prorettype => 'money', proargtypes => 'money money',
-  prosrc => 'cash_mi' },
+  proname => 'cash_mi', prosupport => 'diff_slope_support',
+  prorettype => 'money', proargtypes => 'money money', prosrc => 'cash_mi' },
 { oid => '896',
   proname => 'cash_mul_flt8', prorettype => 'money',
   proargtypes => 'money float8', prosrc => 'cash_mul_flt8' },
@@ -2369,14 +2414,14 @@
   proname => 'date_smaller', prorettype => 'date', proargtypes => 'date date',
   prosrc => 'date_smaller' },
 { oid => '1140',
-  proname => 'date_mi', prorettype => 'int4', proargtypes => 'date date',
-  prosrc => 'date_mi' },
+  proname => 'date_mi', prosupport => 'diff_slope_support',
+  prorettype => 'int4', proargtypes => 'date date', prosrc => 'date_mi' },
 { oid => '1141',
-  proname => 'date_pli', prorettype => 'date', proargtypes => 'date int4',
-  prosrc => 'date_pli' },
+  proname => 'date_pli', prosupport => 'addition_slope_support',
+  prorettype => 'date', proargtypes => 'date int4', prosrc => 'date_pli' },
 { oid => '1142',
-  proname => 'date_mii', prorettype => 'date', proargtypes => 'date int4',
-  prosrc => 'date_mii' },
+  proname => 'date_mii', prosupport => 'diff_slope_support',
+  prorettype => 'date', proargtypes => 'date int4', prosrc => 'date_mii' },
 { oid => '1143', descr => 'I/O',
   proname => 'time_in', provolatile => 's', prorettype => 'time',
   proargtypes => 'cstring oid int4', prosrc => 'time_in' },
@@ -2437,7 +2482,8 @@
   proname => 'timestamptz_gt', proleakproof => 't', prorettype => 'bool',
   proargtypes => 'timestamptz timestamptz', prosrc => 'timestamp_gt' },
 { oid => '1158', descr => 'convert UNIX epoch to timestamptz',
-  proname => 'to_timestamp', prorettype => 'timestamptz',
+  proname => 'to_timestamp', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'timestamptz',
   proargtypes => 'float8', prosrc => 'float8_timestamptz' },
 { oid => '1159', descr => 'adjust timestamp to new time zone',
   proname => 'timezone', prorettype => 'timestamp',
@@ -2477,14 +2523,17 @@
   proname => 'interval_gt', proleakproof => 't', prorettype => 'bool',
   proargtypes => 'interval interval', prosrc => 'interval_gt' },
 { oid => '1168',
-  proname => 'interval_um', prorettype => 'interval', proargtypes => 'interval',
+  proname => 'interval_um', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'interval', proargtypes => 'interval',
   prosrc => 'interval_um' },
 { oid => '1169',
-  proname => 'interval_pl', prorettype => 'interval',
-  proargtypes => 'interval interval', prosrc => 'interval_pl' },
+  proname => 'interval_pl', prosupport => 'addition_slope_support',
+  prorettype => 'interval', proargtypes => 'interval interval',
+  prosrc => 'interval_pl' },
 { oid => '1170',
-  proname => 'interval_mi', prorettype => 'interval',
-  proargtypes => 'interval interval', prosrc => 'interval_mi' },
+  proname => 'interval_mi', prosupport => 'diff_slope_support',
+  prorettype => 'interval', proargtypes => 'interval interval',
+  prosrc => 'interval_mi' },
 { oid => '1171', descr => 'extract field from timestamp with time zone',
   proname => 'date_part', provolatile => 's', prorettype => 'float8',
   proargtypes => 'text timestamptz', prosrc => 'timestamptz_part' },
@@ -2498,7 +2547,8 @@
   proname => 'extract', prorettype => 'numeric', proargtypes => 'text interval',
   prosrc => 'extract_interval' },
 { oid => '1174', descr => 'convert date to timestamp with time zone',
-  proname => 'timestamptz', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'timestamptz', prosupport => 'arg0_asc_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'date', prosrc => 'date_timestamptz' },
 { oid => '2711',
   descr => 'promote groups of 24 hours to numbers of days and promote groups of 30 days to numbers of months',
@@ -2515,7 +2565,8 @@
   prorettype => 'timestamptz', proargtypes => 'date time',
   prosrc => 'see system_functions.sql' },
 { oid => '1178', descr => 'convert timestamp with time zone to date',
-  proname => 'date', provolatile => 's', prorettype => 'date',
+  proname => 'date', prosupport => 'arg0_asc_slope_support',
+  provolatile => 's', prorettype => 'date',
   proargtypes => 'timestamptz', prosrc => 'timestamptz_date' },
 { oid => '1181',
   descr => 'age of a transaction ID, in transactions before current transaction',
@@ -2527,14 +2578,16 @@
   proargtypes => 'xid', prosrc => 'mxid_age' },
 
 { oid => '1188',
-  proname => 'timestamptz_mi', prorettype => 'interval',
-  proargtypes => 'timestamptz timestamptz', prosrc => 'timestamp_mi' },
+  proname => 'timestamptz_mi', prosupport => 'diff_slope_support',
+  prorettype => 'interval', proargtypes => 'timestamptz timestamptz',
+  prosrc => 'timestamp_mi' },
 { oid => '1189',
-  proname => 'timestamptz_pl_interval', provolatile => 's',
-  prorettype => 'timestamptz', proargtypes => 'timestamptz interval',
-  prosrc => 'timestamptz_pl_interval' },
+  proname => 'timestamptz_pl_interval', prosupport => 'addition_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
+  proargtypes => 'timestamptz interval', prosrc => 'timestamptz_pl_interval' },
 { oid => '6221', descr => 'add interval to timestamp with time zone',
-  proname => 'date_add', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'date_add', prosupport => 'addition_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'timestamptz interval', prosrc => 'timestamptz_pl_interval' },
 { oid => '6222',
   descr => 'add interval to timestamp with time zone in specified time zone',
@@ -2542,11 +2595,12 @@
   proargtypes => 'timestamptz interval text',
   prosrc => 'timestamptz_pl_interval_at_zone' },
 { oid => '1190',
-  proname => 'timestamptz_mi_interval', provolatile => 's',
-  prorettype => 'timestamptz', proargtypes => 'timestamptz interval',
-  prosrc => 'timestamptz_mi_interval' },
+  proname => 'timestamptz_mi_interval', prosupport => 'diff_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
+  proargtypes => 'timestamptz interval', prosrc => 'timestamptz_mi_interval' },
 { oid => '6223', descr => 'subtract interval from timestamp with time zone',
-  proname => 'date_subtract', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'date_subtract', prosupport => 'diff_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'timestamptz interval', prosrc => 'timestamptz_mi_interval' },
 { oid => '6273',
   descr => 'subtract interval from timestamp with time zone in specified time zone',
@@ -2595,14 +2649,17 @@
 
 { oid => '1217',
   descr => 'truncate timestamp with time zone to specified units',
-  proname => 'date_trunc', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'date_trunc', prosupport => 'arg1_asc_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'text timestamptz', prosrc => 'timestamptz_trunc' },
 { oid => '1284',
   descr => 'truncate timestamp with time zone to specified units in specified time zone',
-  proname => 'date_trunc', prorettype => 'timestamptz',
+  proname => 'date_trunc', prosupport => 'arg1_asc_slope_support',
+  prorettype => 'timestamptz',
   proargtypes => 'text timestamptz text', prosrc => 'timestamptz_trunc_zone' },
 { oid => '1218', descr => 'truncate interval to specified units',
-  proname => 'date_trunc', prorettype => 'interval',
+  proname => 'date_trunc', prosupport => 'arg1_asc_slope_support',
+  prorettype => 'interval',
   proargtypes => 'text interval', prosrc => 'interval_trunc' },
 
 { oid => '1219', descr => 'increment',
@@ -2664,11 +2721,11 @@
   proname => 'extract', prorettype => 'numeric', proargtypes => 'text timetz',
   prosrc => 'extract_timetz' },
 { oid => '1274',
-  proname => 'int84pl', prorettype => 'int8', proargtypes => 'int8 int4',
-  prosrc => 'int84pl' },
+  proname => 'int84pl', prosupport => 'addition_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int4', prosrc => 'int84pl' },
 { oid => '1275',
-  proname => 'int84mi', prorettype => 'int8', proargtypes => 'int8 int4',
-  prosrc => 'int84mi' },
+  proname => 'int84mi', prosupport => 'diff_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int4', prosrc => 'int84mi' },
 { oid => '1276',
   proname => 'int84mul', prorettype => 'int8', proargtypes => 'int8 int4',
   prosrc => 'int84mul' },
@@ -2676,11 +2733,11 @@
   proname => 'int84div', prorettype => 'int8', proargtypes => 'int8 int4',
   prosrc => 'int84div' },
 { oid => '1278',
-  proname => 'int48pl', prorettype => 'int8', proargtypes => 'int4 int8',
-  prosrc => 'int48pl' },
+  proname => 'int48pl', prosupport => 'addition_slope_support',
+  prorettype => 'int8', proargtypes => 'int4 int8', prosrc => 'int48pl' },
 { oid => '1279',
-  proname => 'int48mi', prorettype => 'int8', proargtypes => 'int4 int8',
-  prosrc => 'int48mi' },
+  proname => 'int48mi', prosupport => 'diff_slope_support',
+  prorettype => 'int8', proargtypes => 'int4 int8', prosrc => 'int48mi' },
 { oid => '1280',
   proname => 'int48mul', prorettype => 'int8', proargtypes => 'int4 int8',
   prosrc => 'int48mul' },
@@ -2689,11 +2746,11 @@
   prosrc => 'int48div' },
 
 { oid => '837',
-  proname => 'int82pl', prorettype => 'int8', proargtypes => 'int8 int2',
-  prosrc => 'int82pl' },
+  proname => 'int82pl', prosupport => 'addition_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int2', prosrc => 'int82pl' },
 { oid => '838',
-  proname => 'int82mi', prorettype => 'int8', proargtypes => 'int8 int2',
-  prosrc => 'int82mi' },
+  proname => 'int82mi', prosupport => 'diff_slope_support',
+  prorettype => 'int8', proargtypes => 'int8 int2', prosrc => 'int82mi' },
 { oid => '839',
   proname => 'int82mul', prorettype => 'int8', proargtypes => 'int8 int2',
   prosrc => 'int82mul' },
@@ -2701,11 +2758,11 @@
   proname => 'int82div', prorettype => 'int8', proargtypes => 'int8 int2',
   prosrc => 'int82div' },
 { oid => '841',
-  proname => 'int28pl', prorettype => 'int8', proargtypes => 'int2 int8',
-  prosrc => 'int28pl' },
+  proname => 'int28pl', prosupport => 'addition_slope_support',
+  prorettype => 'int8', proargtypes => 'int2 int8', prosrc => 'int28pl' },
 { oid => '942',
-  proname => 'int28mi', prorettype => 'int8', proargtypes => 'int2 int8',
-  prosrc => 'int28mi' },
+  proname => 'int28mi', prosupport => 'diff_slope_support',
+  prorettype => 'int8', proargtypes => 'int2 int8', prosrc => 'int28mi' },
 { oid => '943',
   proname => 'int28mul', prorettype => 'int8', proargtypes => 'int2 int8',
   prosrc => 'int28mul' },
@@ -2714,10 +2771,12 @@
   prosrc => 'int28div' },
 
 { oid => '1287', descr => 'convert int8 to oid',
-  proname => 'oid', prorettype => 'oid', proargtypes => 'int8',
+  proname => 'oid', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'oid', proargtypes => 'int8',
   prosrc => 'i8tooid' },
 { oid => '1288', descr => 'convert oid to int8',
-  proname => 'int8', proleakproof => 't', prorettype => 'int8',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'int8',
   proargtypes => 'oid', prosrc => 'oidtoi8' },
 
 { oid => '1291',
@@ -2888,26 +2947,28 @@
   proname => 'dlog10', prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dlog10' },
 { oid => '1340', descr => 'base 10 logarithm',
-  proname => 'log', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dlog10' },
+  proname => 'log', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dlog10' },
 { oid => '1194', descr => 'base 10 logarithm',
-  proname => 'log10', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dlog10' },
+  proname => 'log10', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dlog10' },
 { oid => '1341', descr => 'natural logarithm',
-  proname => 'ln', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dlog1' },
+  proname => 'ln', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dlog1' },
 { oid => '1342', descr => 'round to nearest integer',
-  proname => 'round', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'round', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dround' },
 { oid => '1343', descr => 'truncate to integer',
-  proname => 'trunc', prorettype => 'float8', proargtypes => 'float8',
+  proname => 'trunc', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dtrunc' },
 { oid => '1344', descr => 'square root',
-  proname => 'sqrt', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dsqrt' },
+  proname => 'sqrt', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dsqrt' },
 { oid => '1345', descr => 'cube root',
-  proname => 'cbrt', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dcbrt' },
+  proname => 'cbrt', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dcbrt' },
 { oid => '1346', descr => 'exponentiation',
   proname => 'pow', prorettype => 'float8', proargtypes => 'float8 float8',
   prosrc => 'dpow' },
@@ -2915,8 +2976,8 @@
   proname => 'power', prorettype => 'float8', proargtypes => 'float8 float8',
   prosrc => 'dpow' },
 { oid => '1347', descr => 'natural exponential (e^x)',
-  proname => 'exp', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dexp' },
+  proname => 'exp', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dexp' },
 
 # This form of obj_description is now deprecated, since it will fail if
 # OIDs are not unique across system catalogs.  Use the other form instead.
@@ -3542,14 +3603,14 @@
 # OIDS 1600 - 1699
 
 { oid => '1600', descr => 'arcsine',
-  proname => 'asin', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dasin' },
+  proname => 'asin', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dasin' },
 { oid => '1601', descr => 'arccosine',
-  proname => 'acos', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dacos' },
+  proname => 'acos', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dacos' },
 { oid => '1602', descr => 'arctangent',
-  proname => 'atan', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'datan' },
+  proname => 'atan', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'datan' },
 { oid => '1603', descr => 'arctangent, two arguments',
   proname => 'atan2', prorettype => 'float8', proargtypes => 'float8 float8',
   prosrc => 'datan2' },
@@ -3567,14 +3628,14 @@
   prosrc => 'dcot' },
 
 { oid => '2731', descr => 'arcsine, degrees',
-  proname => 'asind', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dasind' },
+  proname => 'asind', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dasind' },
 { oid => '2732', descr => 'arccosine, degrees',
-  proname => 'acosd', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dacosd' },
+  proname => 'acosd', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dacosd' },
 { oid => '2733', descr => 'arctangent, degrees',
-  proname => 'atand', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'datand' },
+  proname => 'atand', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'datand' },
 { oid => '2734', descr => 'arctangent, two arguments, degrees',
   proname => 'atan2d', prorettype => 'float8', proargtypes => 'float8 float8',
   prosrc => 'datan2d' },
@@ -3592,39 +3653,39 @@
   prosrc => 'dcotd' },
 
 { oid => '1608', descr => 'radians to degrees',
-  proname => 'degrees', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'degrees' },
+  proname => 'degrees', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'degrees' },
 { oid => '1609', descr => 'degrees to radians',
-  proname => 'radians', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'radians' },
+  proname => 'radians', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'radians' },
 { oid => '1610', descr => 'PI',
   proname => 'pi', prorettype => 'float8', proargtypes => '', prosrc => 'dpi' },
 
 { oid => '2462', descr => 'hyperbolic sine',
-  proname => 'sinh', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dsinh' },
+  proname => 'sinh', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dsinh' },
 { oid => '2463', descr => 'hyperbolic cosine',
   proname => 'cosh', prorettype => 'float8', proargtypes => 'float8',
   prosrc => 'dcosh' },
 { oid => '2464', descr => 'hyperbolic tangent',
-  proname => 'tanh', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dtanh' },
+  proname => 'tanh', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dtanh' },
 { oid => '2465', descr => 'inverse hyperbolic sine',
-  proname => 'asinh', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dasinh' },
+  proname => 'asinh', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dasinh' },
 { oid => '2466', descr => 'inverse hyperbolic cosine',
-  proname => 'acosh', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'dacosh' },
+  proname => 'acosh', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'dacosh' },
 { oid => '2467', descr => 'inverse hyperbolic tangent',
-  proname => 'atanh', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'datanh' },
+  proname => 'atanh', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'datanh' },
 
 { oid => '6219', descr => 'error function',
-  proname => 'erf', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'derf' },
+  proname => 'erf', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'derf' },
 { oid => '6220', descr => 'complementary error function',
-  proname => 'erfc', prorettype => 'float8', proargtypes => 'float8',
-  prosrc => 'derfc' },
+  proname => 'erfc', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'float8', proargtypes => 'float8', prosrc => 'derfc' },
 
 { oid => '6383', descr => 'gamma function',
   proname => 'gamma', prorettype => 'float8', proargtypes => 'float8',
@@ -4539,8 +4600,9 @@
   prosrc => 'networkjoinsel' },
 
 { oid => '1690',
-  proname => 'time_mi_time', prorettype => 'interval',
-  proargtypes => 'time time', prosrc => 'time_mi_time' },
+  proname => 'time_mi_time', prosupport => 'diff_slope_support',
+  prorettype => 'interval', proargtypes => 'time time',
+  prosrc => 'time_mi_time' },
 
 { oid => '1691',
   proname => 'boolle', proleakproof => 't', prorettype => 'bool',
@@ -4604,25 +4666,30 @@
   proname => 'sign', prorettype => 'numeric', proargtypes => 'numeric',
   prosrc => 'numeric_sign' },
 { oid => '1707', descr => 'value rounded to \'scale\'',
-  proname => 'round', prorettype => 'numeric', proargtypes => 'numeric int4',
+  proname => 'round', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric int4',
   prosrc => 'numeric_round' },
 { oid => '1708', descr => 'value rounded to \'scale\' of zero',
   proname => 'round', prolang => 'sql', prorettype => 'numeric',
   proargtypes => 'numeric', prosrc => 'see system_functions.sql' },
 { oid => '1709', descr => 'value truncated to \'scale\'',
-  proname => 'trunc', prorettype => 'numeric', proargtypes => 'numeric int4',
+  proname => 'trunc', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric int4',
   prosrc => 'numeric_trunc' },
 { oid => '1710', descr => 'value truncated to \'scale\' of zero',
   proname => 'trunc', prolang => 'sql', prorettype => 'numeric',
   proargtypes => 'numeric', prosrc => 'see system_functions.sql' },
 { oid => '1711', descr => 'nearest integer >= value',
-  proname => 'ceil', prorettype => 'numeric', proargtypes => 'numeric',
+  proname => 'ceil', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric',
   prosrc => 'numeric_ceil' },
 { oid => '2167', descr => 'nearest integer >= value',
-  proname => 'ceiling', prorettype => 'numeric', proargtypes => 'numeric',
+  proname => 'ceiling', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric',
   prosrc => 'numeric_ceil' },
 { oid => '1712', descr => 'nearest integer <= value',
-  proname => 'floor', prorettype => 'numeric', proargtypes => 'numeric',
+  proname => 'floor', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric',
   prosrc => 'numeric_floor' },
 { oid => '1718',
   proname => 'numeric_eq', prorettype => 'bool',
@@ -4643,11 +4710,13 @@
   proname => 'numeric_le', prorettype => 'bool',
   proargtypes => 'numeric numeric', prosrc => 'numeric_le' },
 { oid => '1724',
-  proname => 'numeric_add', prorettype => 'numeric',
-  proargtypes => 'numeric numeric', prosrc => 'numeric_add' },
+  proname => 'numeric_add', prosupport => 'addition_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric numeric',
+  prosrc => 'numeric_add' },
 { oid => '1725',
-  proname => 'numeric_sub', prorettype => 'numeric',
-  proargtypes => 'numeric numeric', prosrc => 'numeric_sub' },
+  proname => 'numeric_sub', prosupport => 'diff_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric numeric',
+  prosrc => 'numeric_sub' },
 { oid => '1726',
   proname => 'numeric_mul', prorettype => 'numeric',
   proargtypes => 'numeric numeric', prosrc => 'numeric_mul' },
@@ -4667,23 +4736,23 @@
   proname => 'lcm', prorettype => 'numeric', proargtypes => 'numeric numeric',
   prosrc => 'numeric_lcm' },
 { oid => '1730', descr => 'square root',
-  proname => 'sqrt', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_sqrt' },
+  proname => 'sqrt', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_sqrt' },
 { oid => '1731', descr => 'square root',
-  proname => 'numeric_sqrt', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_sqrt' },
+  proname => 'numeric_sqrt', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_sqrt' },
 { oid => '1732', descr => 'natural exponential (e^x)',
-  proname => 'exp', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_exp' },
+  proname => 'exp', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_exp' },
 { oid => '1733', descr => 'natural exponential (e^x)',
-  proname => 'numeric_exp', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_exp' },
+  proname => 'numeric_exp', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_exp' },
 { oid => '1734', descr => 'natural logarithm',
-  proname => 'ln', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_ln' },
+  proname => 'ln', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_ln' },
 { oid => '1735', descr => 'natural logarithm',
-  proname => 'numeric_ln', prorettype => 'numeric', proargtypes => 'numeric',
-  prosrc => 'numeric_ln' },
+  proname => 'numeric_ln', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_ln' },
 { oid => '1736', descr => 'logarithm base m of n',
   proname => 'log', prorettype => 'numeric', proargtypes => 'numeric numeric',
   prosrc => 'numeric_log' },
@@ -4710,7 +4779,8 @@
   proname => 'trim_scale', prorettype => 'numeric', proargtypes => 'numeric',
   prosrc => 'numeric_trim_scale' },
 { oid => '1740', descr => 'convert int4 to numeric',
-  proname => 'numeric', proleakproof => 't', prorettype => 'numeric',
+  proname => 'numeric', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'numeric',
   proargtypes => 'int4', prosrc => 'int4_numeric' },
 { oid => '1741', descr => 'base 10 logarithm',
   proname => 'log', prolang => 'sql', prorettype => 'numeric',
@@ -4719,19 +4789,24 @@
   proname => 'log10', prolang => 'sql', prorettype => 'numeric',
   proargtypes => 'numeric', prosrc => 'see system_functions.sql' },
 { oid => '1742', descr => 'convert float4 to numeric',
-  proname => 'numeric', proleakproof => 't', prorettype => 'numeric',
+  proname => 'numeric', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'numeric',
   proargtypes => 'float4', prosrc => 'float4_numeric' },
 { oid => '1743', descr => 'convert float8 to numeric',
-  proname => 'numeric', proleakproof => 't', prorettype => 'numeric',
+  proname => 'numeric', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'numeric',
   proargtypes => 'float8', prosrc => 'float8_numeric' },
 { oid => '1744', descr => 'convert numeric to int4',
-  proname => 'int4', prorettype => 'int4', proargtypes => 'numeric',
+  proname => 'int4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int4', proargtypes => 'numeric',
   prosrc => 'numeric_int4' },
 { oid => '1745', descr => 'convert numeric to float4',
-  proname => 'float4', prorettype => 'float4', proargtypes => 'numeric',
+  proname => 'float4', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float4', proargtypes => 'numeric',
   prosrc => 'numeric_float4' },
 { oid => '1746', descr => 'convert numeric to float8',
-  proname => 'float8', prorettype => 'float8', proargtypes => 'numeric',
+  proname => 'float8', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'float8', proargtypes => 'numeric',
   prosrc => 'numeric_float8' },
 { oid => '1973', descr => 'trunc(x/y)',
   proname => 'div', prorettype => 'numeric', proargtypes => 'numeric numeric',
@@ -4745,17 +4820,21 @@
   prosrc => 'width_bucket_numeric' },
 
 { oid => '1747',
-  proname => 'time_pl_interval', prorettype => 'time',
-  proargtypes => 'time interval', prosrc => 'time_pl_interval' },
+  proname => 'time_pl_interval', prosupport => 'addition_slope_support',
+  prorettype => 'time', proargtypes => 'time interval',
+  prosrc => 'time_pl_interval' },
 { oid => '1748',
-  proname => 'time_mi_interval', prorettype => 'time',
-  proargtypes => 'time interval', prosrc => 'time_mi_interval' },
+  proname => 'time_mi_interval', prosupport => 'diff_slope_support',
+  prorettype => 'time', proargtypes => 'time interval',
+  prosrc => 'time_mi_interval' },
 { oid => '1749',
-  proname => 'timetz_pl_interval', prorettype => 'timetz',
-  proargtypes => 'timetz interval', prosrc => 'timetz_pl_interval' },
+  proname => 'timetz_pl_interval', prosupport => 'addition_slope_support',
+  prorettype => 'timetz', proargtypes => 'timetz interval',
+  prosrc => 'timetz_pl_interval' },
 { oid => '1750',
-  proname => 'timetz_mi_interval', prorettype => 'timetz',
-  proargtypes => 'timetz interval', prosrc => 'timetz_mi_interval' },
+  proname => 'timetz_mi_interval', prosupport => 'diff_slope_support',
+  prorettype => 'timetz', proargtypes => 'timetz interval',
+  prosrc => 'timetz_mi_interval' },
 
 { oid => '1764', descr => 'increment by one',
   proname => 'numeric_inc', prorettype => 'numeric', proargtypes => 'numeric',
@@ -4773,19 +4852,24 @@
   proname => 'numeric_sortsupport', prorettype => 'void',
   proargtypes => 'internal', prosrc => 'numeric_sortsupport' },
 { oid => '1771',
-  proname => 'numeric_uminus', prorettype => 'numeric',
+  proname => 'numeric_uminus', prosupport => 'arg0_desc_slope_support',
+  prorettype => 'numeric',
   proargtypes => 'numeric', prosrc => 'numeric_uminus' },
 { oid => '1779', descr => 'convert numeric to int8',
-  proname => 'int8', prorettype => 'int8', proargtypes => 'numeric',
+  proname => 'int8', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int8', proargtypes => 'numeric',
   prosrc => 'numeric_int8' },
 { oid => '1781', descr => 'convert int8 to numeric',
-  proname => 'numeric', proleakproof => 't', prorettype => 'numeric',
+  proname => 'numeric', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'numeric',
   proargtypes => 'int8', prosrc => 'int8_numeric' },
 { oid => '1782', descr => 'convert int2 to numeric',
-  proname => 'numeric', proleakproof => 't', prorettype => 'numeric',
+  proname => 'numeric', prosupport => 'arg0_asc_slope_support',
+  proleakproof => 't', prorettype => 'numeric',
   proargtypes => 'int2', prosrc => 'int2_numeric' },
 { oid => '1783', descr => 'convert numeric to int2',
-  proname => 'int2', prorettype => 'int2', proargtypes => 'numeric',
+  proname => 'int2', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'int2', proargtypes => 'numeric',
   prosrc => 'numeric_int2' },
 { oid => '6103', descr => 'convert numeric to pg_lsn',
   proname => 'pg_lsn', prorettype => 'pg_lsn', proargtypes => 'numeric',
@@ -6376,15 +6460,18 @@
   proname => 'time', provolatile => 's', prorettype => 'time',
   proargtypes => 'timestamptz', prosrc => 'timestamptz_time' },
 { oid => '2020', descr => 'truncate timestamp to specified units',
-  proname => 'date_trunc', prorettype => 'timestamp',
+  proname => 'date_trunc', prosupport => 'arg1_asc_slope_support',
+  prorettype => 'timestamp',
   proargtypes => 'text timestamp', prosrc => 'timestamp_trunc' },
 
 { oid => '6177', descr => 'bin timestamp into specified interval',
-  proname => 'date_bin', prorettype => 'timestamp',
+  proname => 'date_bin', prosupport => 'arg1_asc_slope_support',
+  prorettype => 'timestamp',
   proargtypes => 'interval timestamp timestamp', prosrc => 'timestamp_bin' },
 { oid => '6178',
   descr => 'bin timestamp with time zone into specified interval',
-  proname => 'date_bin', prorettype => 'timestamptz',
+  proname => 'date_bin', prosupport => 'arg1_asc_slope_support',
+  prorettype => 'timestamptz',
   proargtypes => 'interval timestamptz timestamptz',
   prosrc => 'timestamptz_bin' },
 
@@ -6395,29 +6482,36 @@
   proname => 'extract', prorettype => 'numeric',
   proargtypes => 'text timestamp', prosrc => 'extract_timestamp' },
 { oid => '2024', descr => 'convert date to timestamp',
-  proname => 'timestamp', prorettype => 'timestamp', proargtypes => 'date',
+  proname => 'timestamp', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'timestamp', proargtypes => 'date',
   prosrc => 'date_timestamp' },
 { oid => '2025', descr => 'convert date and time to timestamp',
   proname => 'timestamp', prorettype => 'timestamp', proargtypes => 'date time',
   prosrc => 'datetime_timestamp' },
 { oid => '2027', descr => 'convert timestamp with time zone to timestamp',
-  proname => 'timestamp', provolatile => 's', prorettype => 'timestamp',
+  proname => 'timestamp', prosupport => 'arg0_asc_slope_support',
+  provolatile => 's', prorettype => 'timestamp',
   proargtypes => 'timestamptz', prosrc => 'timestamptz_timestamp' },
 { oid => '2028', descr => 'convert timestamp to timestamp with time zone',
-  proname => 'timestamptz', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'timestamptz', prosupport => 'arg0_asc_slope_support',
+  provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'timestamp', prosrc => 'timestamp_timestamptz' },
 { oid => '2029', descr => 'convert timestamp to date',
-  proname => 'date', prorettype => 'date', proargtypes => 'timestamp',
+  proname => 'date', prosupport => 'arg0_asc_slope_support',
+  prorettype => 'date', proargtypes => 'timestamp',
   prosrc => 'timestamp_date' },
 { oid => '2031',
-  proname => 'timestamp_mi', prorettype => 'interval',
-  proargtypes => 'timestamp timestamp', prosrc => 'timestamp_mi' },
+  proname => 'timestamp_mi', prosupport => 'diff_slope_support',
+  prorettype => 'interval', proargtypes => 'timestamp timestamp',
+  prosrc => 'timestamp_mi' },
 { oid => '2032',
-  proname => 'timestamp_pl_interval', prorettype => 'timestamp',
-  proargtypes => 'timestamp interval', prosrc => 'timestamp_pl_interval' },
+  proname => 'timestamp_pl_interval', prosupport => 'addition_slope_support',
+  prorettype => 'timestamp', proargtypes => 'timestamp interval',
+  prosrc => 'timestamp_pl_interval' },
 { oid => '2033',
-  proname => 'timestamp_mi_interval', prorettype => 'timestamp',
-  proargtypes => 'timestamp interval', prosrc => 'timestamp_mi_interval' },
+  proname => 'timestamp_mi_interval', prosupport => 'diff_slope_support',
+  prorettype => 'timestamp', proargtypes => 'timestamp interval',
+  prosrc => 'timestamp_mi_interval' },
 { oid => '2035', descr => 'smaller of two',
   proname => 'timestamp_smaller', prorettype => 'timestamp',
   proargtypes => 'timestamp timestamp', prosrc => 'timestamp_smaller' },
@@ -6541,10 +6635,10 @@
   proname => 'timezone', provolatile => 's', prorettype => 'timestamptz',
   proargtypes => 'timestamp', prosrc => 'timestamp_at_local' },
 { oid => '2071',
-  proname => 'date_pl_interval', prorettype => 'timestamp',
+  proname => 'date_pl_interval', prosupport => 'addition_slope_support', prorettype => 'timestamp',
   proargtypes => 'date interval', prosrc => 'date_pl_interval' },
 { oid => '2072',
-  proname => 'date_mi_interval', prorettype => 'timestamp',
+  proname => 'date_mi_interval', prosupport => 'diff_slope_support', prorettype => 'timestamp',
   proargtypes => 'date interval', prosrc => 'date_mi_interval' },
 
 { oid => '2073', descr => 'extract text matching regular expression',
-- 
2.53.0

