);
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
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;
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;
/*
- * 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));
}
/*
- * 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);
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