Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

Поиск
Список
Период
Сортировка
От 盏一
Тема Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL
Дата
Msg-id tencent_319A34A95B66D9B4396133AF@qq.com
обсуждение исходный текст
Ответы Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi


I am writing to propose a prototype implementation that can greatly enhance the C/C++ interoperability in PostgreSQL. The implementation involves converting PG longjmp to [force unwind](https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-throw), which triggers the destruction of local variables on the stack. Additionally, it converts throw statements that are not associated with catch to PG longjmp, thereby avoiding the call to terminate.


The proposed implementation can significantly improve the interoperability between C and C++ code in PostgreSQL. It allows for seamless integration of C++ code with PostgreSQL, without the need for complex workarounds or modifications to the existing codebase.


I have submitted the implementation on [GitHub](https://github.com/postgres/postgres/commit/1a9a2790430f256d9d0cc371249e43769d93eb8e#diff-6b6034caa00ddf38f641cbd10d5a5d1bb7135f8b23c5a879e9703bd11bd8240f). I would appreciate it if you could review the implementation and provide feedback.


Thank you for your time and consideration.


Best regards,

盏一----------


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

Предыдущее
От: Erik Rijkers
Дата:
Сообщение: Re: 2023-05-11 release announcement draft
Следующее
От: Yurii Rashkovskii
Дата:
Сообщение: Re: [PATCH] Allow Postgres to pick an unused port to listen