TalGloz <glozmantal@gmail.com> writes:
> But now my compiler throws some other errors when running make:
> myfunc.cpp:29:10: error: conflicting declaration of C function ‘int64_t
> sum_of_numbers()’
> int64_t sum_of_numbers(){
> ^~~~~~~~~~~~~~
Well, yeah, you forgot to repeat the argument list here. For that
matter, spelling Datum as int64_t is a recipe for trouble, even if
it works on some particular platform. Should be
Datum sum_of_numbers(PG_FUNCTION_ARGS) { ...
> Why is it so hard to use C++ with PostgerSQL for a C extension? :)
Probably because you've failed to break your bad C++ habits.
regards, tom lane