libpq's pollution of application namespace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема libpq's pollution of application namespace
Дата
Msg-id 10833.1129501297@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: libpq's pollution of application namespace  (Martijn van Oosterhout <kleptog@svana.org>)
Re: libpq's pollution of application namespace  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
I find that libpq.so exports the following symbols that have neither
PQ, pq, pg, nor lo_ as a prefix:

EncryptMD5
SockAddr_cidr_mask
fe_getauthname
fe_getauthsvc
fe_sendauth
fe_setauthsvc
freeaddrinfo_all
getaddrinfo_all
getnameinfo_all
md5_hash
rangeSockAddr

md5_hash seems a particularly unforgivable intrusion on application
namespace :-(.  Any objection to fixing these things to be prefixed
with pq or pg, which is the convention we usually follow for "internal"
names that can't be static?

Also, these functions strictly speaking violate application namespace,
but given that PQ appears infix, they're probably OK.

appendBinaryPQExpBuffer
appendPQExpBuffer
appendPQExpBufferChar
appendPQExpBufferStr
createPQExpBuffer
destroyPQExpBuffer
enlargePQExpBuffer
initPQExpBuffer
printfPQExpBuffer
resetPQExpBuffer
termPQExpBuffer

It'd be nicer if we could filter out all exported symbols that don't
appear in exports.txt, but I don't know any portable way to do that.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Question about Ctrl-C and less
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slow IN() clause for many cases