From cb7fb3ca958ec8bd5a14e740c067f1d096af3454 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 17 Apr 2003 22:26:02 +0000 Subject: First phase of FE/BE protocol modifications: new StartupPacket layout with variable-width fields. No more truncation of long user names. Also, libpq can now send its environment-variable-driven SET commands as part of the startup packet, saving round trips to server. --- src/backend/tcop/postgres.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index bbfa4695a3b..1048d2fa1c6 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.320 2003/03/24 18:33:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.321 2003/04/17 22:26:01 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1611,6 +1611,26 @@ PostgresMain(int argc, char *argv[], const char *username) if (debug_flag >= 5) SetConfigOption("debug_print_rewritten", "true", ctx, gucsource); + /* + * Process any additional GUC variable settings passed in startup packet. + */ + if (MyProcPort != NULL) + { + List *gucopts = MyProcPort->guc_options; + + while (gucopts) + { + char *name, + *value; + + name = lfirst(gucopts); + gucopts = lnext(gucopts); + value = lfirst(gucopts); + gucopts = lnext(gucopts); + SetConfigOption(name, value, PGC_BACKEND, PGC_S_CLIENT); + } + } + /* * Post-processing for command line options. */ @@ -1795,7 +1815,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.320 $ $Date: 2003/03/24 18:33:52 $\n"); + puts("$Revision: 1.321 $ $Date: 2003/04/17 22:26:01 $\n"); } /* -- cgit v1.2.3