git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d163fdb)
Mop-up for AIX-ectomy: remove now-dead test code.
2024年2月28日 19:34:19 +0000 (14:34 -0500)
2024年2月28日 19:34:19 +0000 (14:34 -0500)
Commit 0b16bb877 removed the test query added by commit 79b716cfb,
but not the C-language support function used by that query. I don't
see any plausible reason why we'd need that function again, so throw
it overboard too.


diff --git a/src/test/regress/expected/test_setup.out b/src/test/regress/expected/test_setup.out
index 5d9e6bf12bc35fe31cf1f7570abed313414e3ce3..3d0eeec996038c32bb56bac2721c1f302f6af061 100644 (file)
--- a/src/test/regress/expected/test_setup.out
+++ b/src/test/regress/expected/test_setup.out
@@ -209,10 +209,6 @@ CREATE FUNCTION ttdummy ()
RETURNS trigger
AS :'regresslib'
LANGUAGE C;
-CREATE FUNCTION get_columns_length(oid[])
- RETURNS int
- AS :'regresslib'
- LANGUAGE C STRICT STABLE PARALLEL SAFE;
-- Use hand-rolled hash functions and operator classes to get predictable
-- result on different machines. The hash function for int4 simply returns
-- the sum of the values passed to it and the one for text returns the length
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index a17afc98be90feffb5545d7b2f27ec7fa3d0a6ca..deffaea578bfb7ecb07409c35303f0bf547e8d8d 100644 (file)
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -42,7 +42,6 @@
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
-#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/typcache.h"
@@ -1222,43 +1221,3 @@ binary_coercible(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(IsBinaryCoercible(srctype, targettype));
}
-
-/*
- * Return the length of the portion of a tuple consisting of the given array
- * of data types. The input data types must be fixed-length data types.
- */
-PG_FUNCTION_INFO_V1(get_columns_length);
-Datum
-get_columns_length(PG_FUNCTION_ARGS)
-{
- ArrayType *ta = PG_GETARG_ARRAYTYPE_P(0);
- Oid *type_oids;
- int ntypes;
- int column_offset = 0;
-
- if (ARR_HASNULL(ta) && array_contains_nulls(ta))
- elog(ERROR, "argument must not contain nulls");
-
- if (ARR_NDIM(ta) > 1)
- elog(ERROR, "argument must be empty or one-dimensional array");
-
- type_oids = (Oid *) ARR_DATA_PTR(ta);
- ntypes = ArrayGetNItems(ARR_NDIM(ta), ARR_DIMS(ta));
- for (int i = 0; i < ntypes; i++)
- {
- Oid typeoid = type_oids[i];
- int16 typlen;
- bool typbyval;
- char typalign;
-
- get_typlenbyvalalign(typeoid, &typlen, &typbyval, &typalign);
-
- /* the data type must be fixed-length */
- if (typlen < 0)
- elog(ERROR, "type %u is not fixed-length data type", typeoid);
-
- column_offset = att_align_nominal(column_offset + typlen, typalign);
- }
-
- PG_RETURN_INT32(column_offset);
-}
diff --git a/src/test/regress/sql/test_setup.sql b/src/test/regress/sql/test_setup.sql
index 1b2d434683b02e1b18ab4efe05a1233880e53137..06b0e2121f895e0dd805cef34b72c7f0c4b24a82 100644 (file)
--- a/src/test/regress/sql/test_setup.sql
+++ b/src/test/regress/sql/test_setup.sql
@@ -257,11 +257,6 @@ CREATE FUNCTION ttdummy ()
AS :'regresslib'
LANGUAGE C;
-CREATE FUNCTION get_columns_length(oid[])
- RETURNS int
- AS :'regresslib'
- LANGUAGE C STRICT STABLE PARALLEL SAFE;
-
-- Use hand-rolled hash functions and operator classes to get predictable
-- result on different machines. The hash function for int4 simply returns
-- the sum of the values passed to it and the one for text returns the length
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /