Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 541757f

Browse filesBrowse files
committed
psql: Remove one use of HAVE_UNIX_SOCKETS
This use was not protecting any unportable code, it was just omitting the code because it wouldn't be used. Remove the use to reduce code complexity a bit. Discussion: https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
1 parent b691c18 commit 541757f
Copy full SHA for 541757f

File tree

Expand file treeCollapse file tree

1 file changed

+0
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-7
lines changed

‎src/bin/psql/prompt.c

Copy file name to clipboardExpand all lines: src/bin/psql/prompt.c
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
#include <win32.h>
1313
#endif
1414

15-
#ifdef HAVE_UNIX_SOCKETS
16-
#include <unistd.h>
17-
#include <netdb.h>
18-
#endif
19-
2015
#include "common.h"
2116
#include "common/string.h"
2217
#include "input.h"
@@ -147,7 +142,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
147142
if (*p == 'm')
148143
buf[strcspn(buf, ".")] = '\0';
149144
}
150-
#ifdef HAVE_UNIX_SOCKETS
151145
/* UNIX socket */
152146
else
153147
{
@@ -158,7 +152,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
158152
else
159153
snprintf(buf, sizeof(buf), "[local:%s]", host);
160154
}
161-
#endif
162155
}
163156
break;
164157
/* DB server port number */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.