Re: PostgreSQL C Language Extension with C++ Code
| От | Tom Lane |
|---|---|
| Тема | Re: PostgreSQL C Language Extension with C++ Code |
| Дата | |
| Msg-id | 1607.1534101134@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: PostgreSQL C Language Extension with C++ Code (TalGloz <glozmantal@gmail.com>) |
| Ответы |
Re: PostgreSQL C Language Extension with C++ Code
Re: PostgreSQL C Language Extension with C++ Code |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: