mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Clean up libpq's pollution of application namespace by renaming the
exported routines of ip.c, md5.c, and fe-auth.c to begin with 'pg_'. Also get rid of the vestigial fe_setauthsvc/fe_getauthsvc routines altogether.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PostgreSQL type definitions for the INET and CIDR types.
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.55 2005/10/15 02:49:29 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/network.c,v 1.56 2005/10/17 16:24:19 tgl Exp $
|
||||
*
|
||||
* Jon Postel RIP 16 Oct 1998
|
||||
*/
|
||||
@@ -1013,10 +1013,10 @@ inet_client_addr(PG_FUNCTION_ARGS)
|
||||
|
||||
remote_host[0] = '\0';
|
||||
|
||||
ret = getnameinfo_all(&port->raddr.addr, port->raddr.salen,
|
||||
remote_host, sizeof(remote_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
|
||||
remote_host, sizeof(remote_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
@@ -1050,10 +1050,10 @@ inet_client_port(PG_FUNCTION_ARGS)
|
||||
|
||||
remote_port[0] = '\0';
|
||||
|
||||
ret = getnameinfo_all(&port->raddr.addr, port->raddr.salen,
|
||||
NULL, 0,
|
||||
remote_port, sizeof(remote_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
|
||||
NULL, 0,
|
||||
remote_port, sizeof(remote_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
@@ -1087,10 +1087,10 @@ inet_server_addr(PG_FUNCTION_ARGS)
|
||||
|
||||
local_host[0] = '\0';
|
||||
|
||||
ret = getnameinfo_all(&port->laddr.addr, port->laddr.salen,
|
||||
local_host, sizeof(local_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&port->laddr.addr, port->laddr.salen,
|
||||
local_host, sizeof(local_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
@@ -1124,10 +1124,10 @@ inet_server_port(PG_FUNCTION_ARGS)
|
||||
|
||||
local_port[0] = '\0';
|
||||
|
||||
ret = getnameinfo_all(&port->laddr.addr, port->laddr.salen,
|
||||
NULL, 0,
|
||||
local_port, sizeof(local_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&port->laddr.addr, port->laddr.salen,
|
||||
NULL, 0,
|
||||
local_port, sizeof(local_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/pgstatfuncs.c,v 1.25 2005/10/15 02:49:29 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/pgstatfuncs.c,v 1.26 2005/10/17 16:24:19 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -417,10 +417,10 @@ pg_stat_get_backend_client_addr(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
remote_host[0] = '\0';
|
||||
ret = getnameinfo_all(&beentry->clientaddr.addr, beentry->clientaddr.salen,
|
||||
remote_host, sizeof(remote_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&beentry->clientaddr.addr, beentry->clientaddr.salen,
|
||||
remote_host, sizeof(remote_host),
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
@@ -462,11 +462,11 @@ pg_stat_get_backend_client_port(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
remote_port[0] = '\0';
|
||||
ret = getnameinfo_all(&beentry->clientaddr.addr,
|
||||
beentry->clientaddr.salen,
|
||||
NULL, 0,
|
||||
remote_port, sizeof(remote_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
ret = pg_getnameinfo_all(&beentry->clientaddr.addr,
|
||||
beentry->clientaddr.salen,
|
||||
NULL, 0,
|
||||
remote_port, sizeof(remote_port),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
if (ret)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.136 2005/10/15 02:49:30 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.137 2005/10/17 16:24:19 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2613,7 +2613,7 @@ md5_text(PG_FUNCTION_ARGS)
|
||||
len = VARSIZE(in_text) - VARHDRSZ;
|
||||
|
||||
/* get the hash result */
|
||||
if (md5_hash(VARDATA(in_text), len, hexsum) == false)
|
||||
if (pg_md5_hash(VARDATA(in_text), len, hexsum) == false)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of memory")));
|
||||
@@ -2636,7 +2636,7 @@ md5_bytea(PG_FUNCTION_ARGS)
|
||||
text *result_text;
|
||||
|
||||
len = VARSIZE(in) - VARHDRSZ;
|
||||
if (md5_hash(VARDATA(in), len, hexsum) == false)
|
||||
if (pg_md5_hash(VARDATA(in), len, hexsum) == false)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of memory")));
|
||||
|
||||
Reference in New Issue
Block a user