Postgresql – Are C++ vectors in a user-defined aggregate function a POD for Postgres

postgresqlpostgresql-12postgresql-extensions

The official postgres documentation (docs) states in section "37.10.11. Using C++ for Extensibility" that

  • If calling backend functions from C++ code, be sure that the C++ call stack contains only plain old data structures (POD). This is necessary because backend errors generate a distant longjmp() that does not properly unroll a C++ call stack with non-POD objects

So, are std::vectors< uint64_t > considered POD or not? I wish I could tell from reading the above instructions but I cannot. Can someone help? Thanks.

Best Answer

Yes, they are, because they do not appear in plain C.