index 96093477b65c68b20ee255cf72bdc3096ffc5b99..0ab85a883c05f2764ebd32f053eb855c0ac6ed2e 100644 (file)
);
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
index 04511050b1422cfa883c5f2b15a9b8e347be74e2..26e2227d3afed45cd28622b424a2b77643d90375 100644 (file)
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;
index 18d2a1501683a407f60966b869cc498a4120e2da..8c50d9b30992b347f49165d41c9c5b5012fd1afc 100644 (file)
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;
index a0058ed6a8239dbbf94c4e403f1125217111bfc9..e14322c798adbfd0e50d9f71aeeefa426e8a0fe4 100644 (file)
/*
- * 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);
index 9a5b5bbadd220577adca5810d99806f39c660bac..07061bc02a623e95ab506daa9bb5d921b3641bec 100644 (file)
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