diff options
author | Bryan Henderson <bryanh@giraffe.netgate.net> | 1997-01-05 21:20:34 +0000 |
---|---|---|
committer | Bryan Henderson <bryanh@giraffe.netgate.net> | 1997-01-05 21:20:34 +0000 |
commit | 7bfb924aea0a459540a58db002f5a6b00842ff08 (patch) | |
tree | 9834cf0a1a26b052e43f223444b4c46c625ecb08 /src/tutorial/C-code/funcs.c | |
parent | 227015b08ec10e8422b33bc988951fdd1d0ce5d0 (diff) | |
download | postgresql-7bfb924aea0a459540a58db002f5a6b00842ff08.tar.gz postgresql-7bfb924aea0a459540a58db002f5a6b00842ff08.zip |
Silence compiler warnings, fix error in complex compare function.
Diffstat (limited to 'src/tutorial/C-code/funcs.c')
-rw-r--r-- | src/tutorial/C-code/funcs.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tutorial/C-code/funcs.c b/src/tutorial/C-code/funcs.c index f91b4d62058..a721b2bbfdf 100644 --- a/src/tutorial/C-code/funcs.c +++ b/src/tutorial/C-code/funcs.c @@ -1,8 +1,29 @@ +/****************************************************************************** + These are user-defined functions that can be bound to a Postgres backend + and called by Postgres to execute SQL functions of the same name. + + The calling format for these functions is defined by the CREATE FUNCTION + SQL statement that binds them to the backend. +*****************************************************************************/ + #include <string.h> #include <stdio.h> #include "postgres.h" /* for char16, etc. */ #include "utils/palloc.h" /* for palloc */ #include "libpq-fe.h" /* for TUPLE */ +#include "executor/executor.h" /* for GetAttributeByName() */ + +/* The following prototypes declare what we assume the user declares to + Postgres in his CREATE FUNCTION statement. +*/ + +int add_one(int arg); +char16 * concat16(char16 *arg1, char16 *arg2); +text * copytext(text *t); +bool c_overpaid(TUPLE t, /* the current instance of EMP */ + int4 limit); + + int add_one(int arg) |