| От | Tom Lane |
|---|---|
| Тема | Re: PQhost() Returns NULL on Connection |
| Дата | |
| Msg-id | 609.1146095978@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | PQhost() Returns NULL on Connection (Keary Suska <hierophant@pcisys.net>) |
| Ответы |
Re: PQhost() Returns NULL on Connection
|
| Список | pgsql-interfaces |
Keary Suska <hierophant@pcisys.net> writes:
> Why would PQhost() return NULL on a valid connection?
One reason why would be if you'd selected the server by hostaddr rather
than host. Returning a host name in this case would require a DNS
lookup, and since the entire point of the hostaddr feature is to avoid
DNS lookups, I don't think that's a particularly great idea.
These functions are really defined as "give me back the connection
options that were specified", anyway, not "peek inside to see what
values are actually in use". So a NULL for an unspecified option
seems reasonable to me.
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера