From 5bb2300b59b74cdc7c8e3f0bf3c8d31c27657670 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 20 Nov 2000 20:36:57 +0000 Subject: Revise handling of oldstyle/newstyle functions per recent discussions in pghackers list. Support for oldstyle internal functions is gone (no longer needed, since conversion is complete) and pg_language entry 'internal' now implies newstyle call convention. pg_language entry 'newC' is gone; both old and newstyle dynamically loaded C functions are now called language 'C'. A newstyle function must be identified by an associated info routine. See src/backend/utils/fmgr/README. --- src/tutorial/funcs_new.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/tutorial/funcs_new.c') diff --git a/src/tutorial/funcs_new.c b/src/tutorial/funcs_new.c index 0734e67a113..20f609d5d2d 100644 --- a/src/tutorial/funcs_new.c +++ b/src/tutorial/funcs_new.c @@ -30,6 +30,8 @@ Datum c_overpaid(PG_FUNCTION_ARGS); /* By Value */ +PG_FUNCTION_INFO_V1(add_one); + Datum add_one(PG_FUNCTION_ARGS) { @@ -40,6 +42,8 @@ add_one(PG_FUNCTION_ARGS) /* By Reference, Fixed Length */ +PG_FUNCTION_INFO_V1(add_one_float8); + Datum add_one_float8(PG_FUNCTION_ARGS) { @@ -49,6 +53,8 @@ add_one_float8(PG_FUNCTION_ARGS) PG_RETURN_FLOAT8(arg + 1.0); } +PG_FUNCTION_INFO_V1(makepoint); + Datum makepoint(PG_FUNCTION_ARGS) { @@ -64,6 +70,8 @@ makepoint(PG_FUNCTION_ARGS) /* By Reference, Variable Length */ +PG_FUNCTION_INFO_V1(copytext); + Datum copytext(PG_FUNCTION_ARGS) { @@ -82,6 +90,8 @@ copytext(PG_FUNCTION_ARGS) PG_RETURN_TEXT_P(new_t); } +PG_FUNCTION_INFO_V1(concat_text); + Datum concat_text(PG_FUNCTION_ARGS) { @@ -99,6 +109,8 @@ concat_text(PG_FUNCTION_ARGS) /* Composite types */ +PG_FUNCTION_INFO_V1(c_overpaid); + Datum c_overpaid(PG_FUNCTION_ARGS) { -- cgit v1.2.3