Skip to content

Commit eea8cda

Browse files
committed
tidy postgres.c
1 parent 46114d4 commit eea8cda

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/backend/tcop/postgres.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@
9393
const char *debug_query_string; /* client-supplied query string */
9494

9595
/* Note: whereToSendOutput is initialized for the bootstrap/standalone case */
96+
#ifdef EMSCRIPTEN
9697
CommandDest whereToSendOutput = DestRemote;
98+
#else
99+
CommandDest whereToSendOutput = DestDebug;
100+
#endif
97101

98102
/* flag for logging end of session */
99103
bool Log_disconnections = false;
@@ -521,12 +525,14 @@ ReadCommand(StringInfo inBuf)
521525
{
522526
int result;
523527

528+
#ifdef EMSCRIPTEN
529+
result = EmscriptenBackend(inBuf);
530+
#else
524531
if (whereToSendOutput == DestRemote)
525-
result = EmscriptenBackend(inBuf);
526-
else if (whereToSendOutput == DestDebugJson)
527-
result = EmscriptenBackend(inBuf);
532+
result = SocketBackend(inBuf);
528533
else
529534
result = InteractiveBackend(inBuf);
535+
#endif
530536
return result;
531537
}
532538

0 commit comments

Comments
 (0)