25 #ifndef SRC_COMMON_SRC_PGR_ALLOC_HPP_
26 #define SRC_COMMON_SRC_PGR_ALLOC_HPP_
31 #if PGSQL_VERSION < 94
39 #include <utils/palloc.h>
64 ptr =
static_cast<T*
>(SPI_palloc(size *
sizeof(T)));
66 ptr =
static_cast<T*
>(SPI_repalloc(ptr, size *
sizeof(T)));
81 pgr_msg(
const std::string &msg);
83 #endif // SRC_COMMON_SRC_PGR_ALLOC_HPP_
T * pgr_alloc(std::size_t size, T *ptr)
allocates memory
char * pgr_msg(const std::string &msg)