aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs_new.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-11-20 20:36:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-11-20 20:36:57 +0000
commit5bb2300b59b74cdc7c8e3f0bf3c8d31c27657670 (patch)
tree8a0e76a6742884477e5bb50639e9a7ab9ba42872 /src/tutorial/funcs_new.c
parent99198ac6b8d2003949a02a148f4483e2f95e7dd4 (diff)
downloadpostgresql-5bb2300b59b74cdc7c8e3f0bf3c8d31c27657670.tar.gz
postgresql-5bb2300b59b74cdc7c8e3f0bf3c8d31c27657670.zip
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.
Diffstat (limited to 'src/tutorial/funcs_new.c')
-rw-r--r--src/tutorial/funcs_new.c12
1 files changed, 12 insertions, 0 deletions
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)
{