mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Rename PortName to PortNumber.
This commit is contained in:
parent
ab47254757
commit
026643a6e7
@ -29,7 +29,7 @@
|
|||||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pqcomm.c,v 1.111 2000/11/13 21:31:46 momjian Exp $
|
* $Id: pqcomm.c,v 1.112 2000/11/14 01:15:00 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -175,7 +175,7 @@ StreamDoUnlink(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
StreamServerPort(int family, char *hostName, unsigned short portName,
|
StreamServerPort(int family, char *hostName, unsigned short portNumber,
|
||||||
char *unixSocketName, int *fdP)
|
char *unixSocketName, int *fdP)
|
||||||
{
|
{
|
||||||
SockAddr saddr;
|
SockAddr saddr;
|
||||||
@ -219,7 +219,7 @@ StreamServerPort(int family, char *hostName, unsigned short portName,
|
|||||||
#ifdef HAVE_UNIX_SOCKETS
|
#ifdef HAVE_UNIX_SOCKETS
|
||||||
if (family == AF_UNIX)
|
if (family == AF_UNIX)
|
||||||
{
|
{
|
||||||
UNIXSOCK_PATH(saddr.un, portName, unixSocketName);
|
UNIXSOCK_PATH(saddr.un, portNumber, unixSocketName);
|
||||||
len = UNIXSOCK_LEN(saddr.un);
|
len = UNIXSOCK_LEN(saddr.un);
|
||||||
strcpy(sock_path, saddr.un.sun_path);
|
strcpy(sock_path, saddr.un.sun_path);
|
||||||
/*
|
/*
|
||||||
@ -265,7 +265,7 @@ StreamServerPort(int family, char *hostName, unsigned short portName,
|
|||||||
hp->h_length);
|
hp->h_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
saddr.in.sin_port = htons(portName);
|
saddr.in.sin_port = htons(portNumber);
|
||||||
len = sizeof(struct sockaddr_in);
|
len = sizeof(struct sockaddr_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.184 2000/11/13 23:37:52 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.185 2000/11/14 01:15:01 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -113,7 +113,7 @@ static Dllist *BackendList;
|
|||||||
static Dllist *PortList;
|
static Dllist *PortList;
|
||||||
|
|
||||||
/* The socket number we are listening for connections on */
|
/* The socket number we are listening for connections on */
|
||||||
int PostPortName;
|
int PostPortNumber;
|
||||||
char * UnixSocketName;
|
char * UnixSocketName;
|
||||||
char * HostName;
|
char * HostName;
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
strcpy(original_extraoptions, optarg);
|
strcpy(original_extraoptions, optarg);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
PostPortName = atoi(optarg);
|
PostPortNumber = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
|
|
||||||
@ -616,7 +616,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
if (NetServer)
|
if (NetServer)
|
||||||
{
|
{
|
||||||
status = StreamServerPort(AF_INET, HostName,
|
status = StreamServerPort(AF_INET, HostName,
|
||||||
(unsigned short) PostPortName, UnixSocketName,
|
(unsigned short) PostPortNumber, UnixSocketName,
|
||||||
&ServerSock_INET);
|
&ServerSock_INET);
|
||||||
if (status != STATUS_OK)
|
if (status != STATUS_OK)
|
||||||
{
|
{
|
||||||
@ -628,7 +628,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
|
|
||||||
#ifdef HAVE_UNIX_SOCKETS
|
#ifdef HAVE_UNIX_SOCKETS
|
||||||
status = StreamServerPort(AF_UNIX, HostName,
|
status = StreamServerPort(AF_UNIX, HostName,
|
||||||
(unsigned short) PostPortName, UnixSocketName,
|
(unsigned short) PostPortNumber, UnixSocketName,
|
||||||
&ServerSock_UNIX);
|
&ServerSock_UNIX);
|
||||||
if (status != STATUS_OK)
|
if (status != STATUS_OK)
|
||||||
{
|
{
|
||||||
@ -639,7 +639,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set up shared memory and semaphores */
|
/* set up shared memory and semaphores */
|
||||||
reset_shared(PostPortName);
|
reset_shared(PostPortNumber);
|
||||||
|
|
||||||
/* Init XLOG paths */
|
/* Init XLOG paths */
|
||||||
snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir);
|
snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir);
|
||||||
@ -1619,7 +1619,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
ctime(&tnow));
|
ctime(&tnow));
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
shmem_exit(0);
|
shmem_exit(0);
|
||||||
reset_shared(PostPortName);
|
reset_shared(PostPortNumber);
|
||||||
StartupPID = StartupDataBase();
|
StartupPID = StartupDataBase();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Support for grand unified configuration scheme, including SET
|
* Support for grand unified configuration scheme, including SET
|
||||||
* command, configuration file, and command line options.
|
* command, configuration file, and command line options.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.18 2000/11/13 21:35:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.19 2000/11/14 01:15:02 momjian Exp $
|
||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
@ -245,7 +245,7 @@ ConfigureNamesInt[] =
|
|||||||
DEF_MAXBACKENDS, 1, MAXBACKENDS},
|
DEF_MAXBACKENDS, 1, MAXBACKENDS},
|
||||||
{"shared_buffers", PGC_POSTMASTER, &NBuffers,
|
{"shared_buffers", PGC_POSTMASTER, &NBuffers,
|
||||||
DEF_NBUFFERS, 16, INT_MAX},
|
DEF_NBUFFERS, 16, INT_MAX},
|
||||||
{"port", PGC_POSTMASTER, &PostPortName,
|
{"port", PGC_POSTMASTER, &PostPortNumber,
|
||||||
DEF_PGPORT, 1, 65535},
|
DEF_PGPORT, 1, 65535},
|
||||||
|
|
||||||
{"sort_mem", PGC_USERSET, &SortMem,
|
{"sort_mem", PGC_USERSET, &SortMem,
|
||||||
@ -409,7 +409,7 @@ ResetAllOptions(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getenv("PGPORT"))
|
if (getenv("PGPORT"))
|
||||||
PostPortName = atoi(getenv("PGPORT"));
|
PostPortNumber = atoi(getenv("PGPORT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: libpq.h,v 1.40 2000/11/13 15:18:14 momjian Exp $
|
* $Id: libpq.h,v 1.41 2000/11/14 01:15:04 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -56,7 +56,7 @@ extern char PQerrormsg[PQERRORMSG_LENGTH]; /* in libpq/util.c */
|
|||||||
* prototypes for functions in pqcomm.c
|
* prototypes for functions in pqcomm.c
|
||||||
*/
|
*/
|
||||||
extern int StreamServerPort(int family, char *hostName,
|
extern int StreamServerPort(int family, char *hostName,
|
||||||
unsigned short portName, char *unixSocketName, int *fdP);
|
unsigned short portNumber, char *unixSocketName, int *fdP);
|
||||||
extern int StreamConnection(int server_fd, Port *port);
|
extern int StreamConnection(int server_fd, Port *port);
|
||||||
extern void StreamClose(int sock);
|
extern void StreamClose(int sock);
|
||||||
extern void pq_init(void);
|
extern void pq_init(void);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: miscadmin.h,v 1.70 2000/11/12 20:51:52 tgl Exp $
|
* $Id: miscadmin.h,v 1.71 2000/11/14 01:15:03 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the information in this file will be moved to
|
* some of the information in this file will be moved to
|
||||||
@ -110,7 +110,7 @@ extern bool EnableSSL;
|
|||||||
extern bool SilentMode;
|
extern bool SilentMode;
|
||||||
extern int MaxBackends;
|
extern int MaxBackends;
|
||||||
extern int NBuffers;
|
extern int NBuffers;
|
||||||
extern int PostPortName;
|
extern int PostPortNumber;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* pdir.h -- *
|
* pdir.h -- *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.146 2000/11/13 23:37:53 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.147 2000/11/14 01:15:06 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -342,13 +342,6 @@ PQconnectStart(const char *conninfo)
|
|||||||
conn->pgunixsocket = conn->pghost;
|
conn->pgunixsocket = conn->pghost;
|
||||||
conn->pghost = NULL;
|
conn->pghost = NULL;
|
||||||
}
|
}
|
||||||
if (conn->pghostaddr && conn->pghostaddr[0] == '/')
|
|
||||||
{
|
|
||||||
if (conn->pgunixsocket)
|
|
||||||
free(conn->pgunixsocket);
|
|
||||||
conn->pgunixsocket = conn->pghostaddr;
|
|
||||||
conn->pghostaddr = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------
|
/* ----------
|
||||||
* Connect to the database
|
* Connect to the database
|
||||||
@ -474,13 +467,6 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions,
|
|||||||
conn->pgunixsocket = conn->pghost;
|
conn->pgunixsocket = conn->pghost;
|
||||||
conn->pghost = NULL;
|
conn->pghost = NULL;
|
||||||
}
|
}
|
||||||
if (conn->pghostaddr && conn->pghostaddr[0] == '/')
|
|
||||||
{
|
|
||||||
if (conn->pgunixsocket)
|
|
||||||
free(conn->pgunixsocket);
|
|
||||||
conn->pgunixsocket = conn->pghostaddr;
|
|
||||||
conn->pghostaddr = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pgtty == NULL)
|
if (pgtty == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user