Skip to content

Commit f0827b4

Browse files
committed
Mop-up for AIX-ectomy: remove now-dead test code.
Commit 0b16bb8 removed the test query added by commit 79b716c, 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.
1 parent d163fdb commit f0827b4

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

src/test/regress/expected/test_setup.out

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ CREATE FUNCTION ttdummy ()
209209
RETURNS trigger
210210
AS :'regresslib'
211211
LANGUAGE C;
212-
CREATE FUNCTION get_columns_length(oid[])
213-
RETURNS int
214-
AS :'regresslib'
215-
LANGUAGE C STRICT STABLE PARALLEL SAFE;
216212
-- Use hand-rolled hash functions and operator classes to get predictable
217213
-- result on different machines. The hash function for int4 simply returns
218214
-- the sum of the values passed to it and the one for text returns the length

src/test/regress/regress.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "utils/array.h"
4343
#include "utils/builtins.h"
4444
#include "utils/geo_decls.h"
45-
#include "utils/lsyscache.h"
4645
#include "utils/memutils.h"
4746
#include "utils/rel.h"
4847
#include "utils/typcache.h"
@@ -1222,43 +1221,3 @@ binary_coercible(PG_FUNCTION_ARGS)
12221221

12231222
PG_RETURN_BOOL(IsBinaryCoercible(srctype, targettype));
12241223
}
1225-
1226-
/*
1227-
* Return the length of the portion of a tuple consisting of the given array
1228-
* of data types. The input data types must be fixed-length data types.
1229-
*/
1230-
PG_FUNCTION_INFO_V1(get_columns_length);
1231-
Datum
1232-
get_columns_length(PG_FUNCTION_ARGS)
1233-
{
1234-
ArrayType *ta = PG_GETARG_ARRAYTYPE_P(0);
1235-
Oid *type_oids;
1236-
int ntypes;
1237-
int column_offset = 0;
1238-
1239-
if (ARR_HASNULL(ta) && array_contains_nulls(ta))
1240-
elog(ERROR, "argument must not contain nulls");
1241-
1242-
if (ARR_NDIM(ta) > 1)
1243-
elog(ERROR, "argument must be empty or one-dimensional array");
1244-
1245-
type_oids = (Oid *) ARR_DATA_PTR(ta);
1246-
ntypes = ArrayGetNItems(ARR_NDIM(ta), ARR_DIMS(ta));
1247-
for (int i = 0; i < ntypes; i++)
1248-
{
1249-
Oid typeoid = type_oids[i];
1250-
int16 typlen;
1251-
bool typbyval;
1252-
char typalign;
1253-
1254-
get_typlenbyvalalign(typeoid, &typlen, &typbyval, &typalign);
1255-
1256-
/* the data type must be fixed-length */
1257-
if (typlen < 0)
1258-
elog(ERROR, "type %u is not fixed-length data type", typeoid);
1259-
1260-
column_offset = att_align_nominal(column_offset + typlen, typalign);
1261-
}
1262-
1263-
PG_RETURN_INT32(column_offset);
1264-
}

src/test/regress/sql/test_setup.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ CREATE FUNCTION ttdummy ()
257257
AS :'regresslib'
258258
LANGUAGE C;
259259

260-
CREATE FUNCTION get_columns_length(oid[])
261-
RETURNS int
262-
AS :'regresslib'
263-
LANGUAGE C STRICT STABLE PARALLEL SAFE;
264-
265260
-- Use hand-rolled hash functions and operator classes to get predictable
266261
-- result on different machines. The hash function for int4 simply returns
267262
-- the sum of the values passed to it and the one for text returns the length

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy