mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Revert renaming of int44in/int44out.
This seemed like a good idea in commit be42eb9d6, 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
This commit is contained in:
parent
6614aaa699
commit
c40e20a83c
@ -16,8 +16,8 @@ CREATE TYPE widget (
|
||||
);
|
||||
CREATE TYPE city_budget (
|
||||
internallength = 16,
|
||||
input = city_budget_in,
|
||||
output = city_budget_out,
|
||||
input = int44in,
|
||||
output = int44out,
|
||||
element = int4,
|
||||
category = 'x', -- just to verify the system will take it
|
||||
preferred = true -- ditto
|
||||
|
@ -12,12 +12,12 @@ CREATE FUNCTION widget_out(widget)
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
|
||||
CREATE FUNCTION city_budget_in(cstring)
|
||||
CREATE FUNCTION int44in(cstring)
|
||||
RETURNS city_budget
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
|
||||
CREATE FUNCTION city_budget_out(city_budget)
|
||||
CREATE FUNCTION int44out(city_budget)
|
||||
RETURNS cstring
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
|
@ -12,13 +12,13 @@ CREATE FUNCTION widget_out(widget)
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
NOTICE: argument type widget is only a shell
|
||||
CREATE FUNCTION city_budget_in(cstring)
|
||||
CREATE FUNCTION int44in(cstring)
|
||||
RETURNS city_budget
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
NOTICE: type "city_budget" is not yet defined
|
||||
DETAIL: Creating a shell type definition.
|
||||
CREATE FUNCTION city_budget_out(city_budget)
|
||||
CREATE FUNCTION int44out(city_budget)
|
||||
RETURNS cstring
|
||||
AS '@libdir@/regress@DLSUFFIX@'
|
||||
LANGUAGE C STRICT IMMUTABLE;
|
||||
|
@ -442,19 +442,19 @@ set_ttdummy(PG_FUNCTION_ARGS)
|
||||
|
||||
|
||||
/*
|
||||
* Type city_budget has no real-world use, but the regression tests use it.
|
||||
* It's a four-element vector of int4's.
|
||||
* Type int44 has no real-world use, but the regression tests use it
|
||||
* (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.
|
||||
*/
|
||||
PG_FUNCTION_INFO_V1(city_budget_in);
|
||||
PG_FUNCTION_INFO_V1(int44in);
|
||||
|
||||
Datum
|
||||
city_budget_in(PG_FUNCTION_ARGS)
|
||||
int44in(PG_FUNCTION_ARGS)
|
||||
{
|
||||
char *input_string = PG_GETARG_CSTRING(0);
|
||||
int32 *result = (int32 *) palloc(4 * sizeof(int32));
|
||||
@ -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
|
||||
city_budget_out(PG_FUNCTION_ARGS)
|
||||
int44out(PG_FUNCTION_ARGS)
|
||||
{
|
||||
int32 *an_array = (int32 *) PG_GETARG_POINTER(0);
|
||||
char *result = (char *) palloc(16 * 4);
|
||||
|
@ -18,8 +18,8 @@ CREATE TYPE widget (
|
||||
|
||||
CREATE TYPE city_budget (
|
||||
internallength = 16,
|
||||
input = city_budget_in,
|
||||
output = city_budget_out,
|
||||
input = int44in,
|
||||
output = int44out,
|
||||
element = int4,
|
||||
category = 'x', -- just to verify the system will take it
|
||||
preferred = true -- ditto
|
||||
|
Loading…
x
Reference in New Issue
Block a user