Re: Postgresql function in C++

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgresql function in C++
Дата
Msg-id 20143.1101675848@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Postgresql function in C++  (Jose Mendoza <unixos@prodigy.net.mx>)
Список pgsql-general
Jose Mendoza <unixos@prodigy.net.mx> writes:
> I would like if it is possible to build a PostgreSQL function in C++.

You can do this to the extent that you're using C++ as "a better C".
As soon as you get into any of the interesting features of the language,
like exceptions or RTTI, you're going to have problems due to lack of
library support --- libstdc++ isn't linked into the backend.

You could force it in there if you don't mind using a custom-built
server, but I'm not sure of the potential gotchas of putting libstdc++
into the backend.  One thing I'm pretty sure will not work in any case
is C++ exceptions; the backend uses its own setjmp-based error recovery
and that's not going to play nicely with C++.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Jose Mendoza
Дата:
Сообщение: Retrieving values of int8 numeric field using ODBC with LInux clients.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Retrieving values of int8 numeric field using ODBC with LInux clients.