1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Review uses of IsUnderPostmaster, change some tests to look at

whereToSendOutput instead because they are really inquiring about
the correct client communication protocol.  Update some comments.
This is pointing towards supporting regular FE/BE client protocol
in a standalone backend, per discussion a month or so back.
This commit is contained in:
Tom Lane
2004-01-28 21:02:40 +00:00
parent b3ead7c045
commit 2f0d43b251
8 changed files with 51 additions and 26 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.386 2004/01/26 22:59:53 momjian Exp $
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.387 2004/01/28 21:02:40 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@ -392,7 +392,7 @@ ReadCommand(StringInfo inBuf)
{
int result;
if (IsUnderPostmaster)
if (whereToSendOutput == Remote)
result = SocketBackend(inBuf);
else
result = InteractiveBackend(inBuf);
@ -2627,8 +2627,8 @@ PostgresMain(int argc, char *argv[], const char *username)
/* Need not flush since ReadyForQuery will do it. */
}
/* Welcome banner for non-frontend case */
if (!IsUnderPostmaster)
/* Welcome banner for standalone case */
if (whereToSendOutput == Debug)
printf("\nPostgreSQL stand-alone backend %s\n", PG_VERSION);
/*