| От | icholy |
|---|---|
| Тема | libpq error message deallocation |
| Дата | |
| Msg-id | 1354646284445-5735032.post@n5.nabble.com обсуждение исходный текст |
| Ответы |
Re: libpq error message deallocation
|
| Список | pgsql-general |
PQerrorMessage function return char const* char const* msg = PQerrorMessage(conn);
Now since it's const, I don't think I should be deallocating it and I've never seen that done in any examples. But then, when and how does it get freed?
At first I thought it gets deallocated once another error message is requested but that's not the case.
// cause some error char const* msg1 = PQerrorMessage(pgconn); // cause another error char const* msg2 = PQerrorMessage(pgconn); // still works std::cout << msg1 << msg2 << std::endl;Can someone shed some light on this for me?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера