diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-17 22:26:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-17 22:26:02 +0000 |
commit | cb7fb3ca958ec8bd5a14e740c067f1d096af3454 (patch) | |
tree | 3494f623627ebebb9590c0ab993297a719bfe7f2 /src/backend/tcop/postgres.c | |
parent | 76fd678c06b826ae50aac5c4afb2e01e69d2b405 (diff) | |
download | postgresql-cb7fb3ca958ec8bd5a14e740c067f1d096af3454.tar.gz postgresql-cb7fb3ca958ec8bd5a14e740c067f1d096af3454.zip |
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.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 24 |
1 files changed, 22 insertions, 2 deletions
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 @@ -1612,6 +1612,26 @@ PostgresMain(int argc, char *argv[], const char *username) 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. */ if (log_statement_stats && @@ -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"); } /* |