1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

Fix postgres --describe-config for guc enums, breakage noted by Alvaro.

While at it, rename option lookup functions to make names clearer, per
discussion with Tom.
This commit is contained in:
Magnus Hagander
2008-03-17 17:45:09 +00:00
parent 164899db1c
commit 7cbfa7565e
3 changed files with 28 additions and 18 deletions

View File

@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.20 2008/02/23 19:23:33 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.21 2008/03/17 17:45:09 mha Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,6 +35,7 @@ typedef union
struct config_real real;
struct config_int integer;
struct config_string string;
struct config_enum _enum;
} mixedStruct;
@@ -120,6 +121,12 @@ printMixedStruct(mixedStruct *structToPrint)
structToPrint->string.boot_val ? structToPrint->string.boot_val : "");
break;
case PGC_ENUM:
printf("ENUM\t%s\t\t\t",
config_enum_lookup_by_value(&structToPrint->_enum,
structToPrint->_enum.boot_val));
break;
default:
write_stderr("internal error: unrecognized run-time parameter type\n");
break;