Commit c40e20a8 authored by Tom Lane's avatar Tom Lane

Revert renaming of int44in/int44out.

This seemed like a good idea in commit be42eb9d, but it causes more
trouble than it's worth for cross-branch upgrade testing.

Discussion: https://postgr.es/m/11927.1519756619@sss.pgh.pa.us
parent 6614aaa6
...@@ -16,8 +16,8 @@ CREATE TYPE widget ( ...@@ -16,8 +16,8 @@ CREATE TYPE widget (
); );
CREATE TYPE city_budget ( CREATE TYPE city_budget (
internallength = 16, internallength = 16,
input = city_budget_in, input = int44in,
output = city_budget_out, output = int44out,
element = int4, element = int4,
category = 'x', -- just to verify the system will take it category = 'x', -- just to verify the system will take it
preferred = true -- ditto preferred = true -- ditto
......
...@@ -12,12 +12,12 @@ CREATE FUNCTION widget_out(widget) ...@@ -12,12 +12,12 @@ CREATE FUNCTION widget_out(widget)
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION city_budget_in(cstring) CREATE FUNCTION int44in(cstring)
RETURNS city_budget RETURNS city_budget
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION city_budget_out(city_budget) CREATE FUNCTION int44out(city_budget)
RETURNS cstring RETURNS cstring
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
......
...@@ -12,13 +12,13 @@ CREATE FUNCTION widget_out(widget) ...@@ -12,13 +12,13 @@ CREATE FUNCTION widget_out(widget)
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
NOTICE: argument type widget is only a shell NOTICE: argument type widget is only a shell
CREATE FUNCTION city_budget_in(cstring) CREATE FUNCTION int44in(cstring)
RETURNS city_budget RETURNS city_budget
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
NOTICE: type "city_budget" is not yet defined NOTICE: type "city_budget" is not yet defined
DETAIL: Creating a shell type definition. DETAIL: Creating a shell type definition.
CREATE FUNCTION city_budget_out(city_budget) CREATE FUNCTION int44out(city_budget)
RETURNS cstring RETURNS cstring
AS '@libdir@/regress@DLSUFFIX@' AS '@libdir@/regress@DLSUFFIX@'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
......
...@@ -442,19 +442,19 @@ set_ttdummy(PG_FUNCTION_ARGS) ...@@ -442,19 +442,19 @@ set_ttdummy(PG_FUNCTION_ARGS)
/* /*
* Type city_budget has no real-world use, but the regression tests use it. * Type int44 has no real-world use, but the regression tests use it
* It's a four-element vector of int4's. * (under the alias "city_budget"). It's a four-element vector of int4's.
*/ */
/* /*
* city_budget_in - converts "num, num, ..." to internal form * int44in - converts "num, num, ..." to internal form
* *
* Note: Fills any missing positions with zeroes. * Note: Fills any missing positions with zeroes.
*/ */
PG_FUNCTION_INFO_V1(city_budget_in); PG_FUNCTION_INFO_V1(int44in);
Datum Datum
city_budget_in(PG_FUNCTION_ARGS) int44in(PG_FUNCTION_ARGS)
{ {
char *input_string = PG_GETARG_CSTRING(0); char *input_string = PG_GETARG_CSTRING(0);
int32 *result = (int32 *) palloc(4 * sizeof(int32)); int32 *result = (int32 *) palloc(4 * sizeof(int32));
...@@ -473,12 +473,12 @@ city_budget_in(PG_FUNCTION_ARGS) ...@@ -473,12 +473,12 @@ city_budget_in(PG_FUNCTION_ARGS)
} }
/* /*
* city_budget_out - converts internal form to "num, num, ..." * int44out - converts internal form to "num, num, ..."
*/ */
PG_FUNCTION_INFO_V1(city_budget_out); PG_FUNCTION_INFO_V1(int44out);
Datum Datum
city_budget_out(PG_FUNCTION_ARGS) int44out(PG_FUNCTION_ARGS)
{ {
int32 *an_array = (int32 *) PG_GETARG_POINTER(0); int32 *an_array = (int32 *) PG_GETARG_POINTER(0);
char *result = (char *) palloc(16 * 4); char *result = (char *) palloc(16 * 4);
......
...@@ -18,8 +18,8 @@ CREATE TYPE widget ( ...@@ -18,8 +18,8 @@ CREATE TYPE widget (
CREATE TYPE city_budget ( CREATE TYPE city_budget (
internallength = 16, internallength = 16,
input = city_budget_in, input = int44in,
output = city_budget_out, output = int44out,
element = int4, element = int4,
category = 'x', -- just to verify the system will take it category = 'x', -- just to verify the system will take it
preferred = true -- ditto preferred = true -- ditto
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment