I inherited some C code that works as a series of libraries using libpq. One of the libraries has an input to it of a PGresult pointer, but not of a PGconnect pointer. Within the library, the code tries to determine the host name of the connection by doing the following trick: strcpy (host,PQhost(((PGresult*)*pgresult)->xconn)); This worked fine in the past (v. 7.0) despite being warned against in the documentation since directly accessing the structures in PGresult seems to be off limits (I suppose in case its structure changes with PG version). I'm trying to think of a workaround that would do things right without having to explicitly pass PGconn pointer into the code. Perhaps this can't be done, but I thought I'd throw out the question and wait for the verbal abuse. -Tony
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера