/* Where the Unix socket files are (list of palloc'd strings) */
static List *sock_paths = NIL;
-PQcommMethods *PqCommMethods;
-
-
/*
* Buffers for low-level I/O.
*
static int Setup_AF_UNIX(char *sock_path);
#endif /* HAVE_UNIX_SOCKETS */
-PQcommMethods PQcommSocketMethods;
-
static PQcommMethods PqCommSocketMethods = {
socket_comm_reset,
socket_flush,
socket_endcopyout
};
+PQcommMethods *PqCommMethods = &PqCommSocketMethods;
+
+
/* --------------------------------
* pq_init - initialize libpq at backend startup
void
pq_init(void)
{
- PqCommMethods = &PqCommSocketMethods;
PqSendBufferSize = PQ_SEND_BUFFER_SIZE;
PqSendBuffer = MemoryContextAlloc(TopMemoryContext, PqSendBufferSize);
PqSendPointer = PqSendStart = PqRecvPointer = PqRecvLength = 0;