44 * Support for grand unified configuration scheme, including SET
55 * command, configuration file, and command line options.
66 *
7- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.19 2000/11/1401:15:02 momjian Exp $
7+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.20 2000/11/1419:13:27 petere Exp $
88 *
99 * Copyright 2000 by PostgreSQL Global Development Group
1010 * Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -41,8 +41,8 @@ extern int XLOGbuffers;
4141extern int XLOG_DEBUG ;
4242#ifdef ENABLE_SYSLOG
4343extern char * Syslog_facility ;
44- extern char * Syslog_progid ;
45- bool check_facility (const char * facility );
44+ extern char * Syslog_ident ;
45+ bool check_facility (const char * facility );
4646#endif
4747
4848/*
@@ -308,10 +308,11 @@ ConfigureNamesString[] =
308308
309309{"unix_socket_group" ,PGC_POSTMASTER ,& Unix_socket_group ,
310310"" ,NULL },
311+
311312#ifdef ENABLE_SYSLOG
312- {"syslog_facility" ,PGC_SIGHUP ,& Syslog_facility ,
313+ {"syslog_facility" ,PGC_POSTMASTER ,& Syslog_facility ,
313314"LOCAL0" ,check_facility },
314- {"syslog_progid " ,PGC_SIGHUP ,& Syslog_progid ,
315+ {"syslog_ident " ,PGC_POSTMASTER ,& Syslog_ident ,
315316"postgres" ,NULL },
316317#endif
317318
@@ -608,7 +609,7 @@ set_config_option(const char * name, const char * value, GucContext
608609bool boolval ;
609610if (!parse_bool (value ,& boolval ))
610611{
611- elog (elevel ,"Option '%s' requires a boolean value" ,name );
612+ elog (elevel ,"option '%s' requires a boolean value" ,name );
612613return false;
613614}
614615if (DoIt )
@@ -629,12 +630,12 @@ set_config_option(const char * name, const char * value, GucContext
629630
630631if (!parse_int (value ,& intval ))
631632{
632- elog (elevel ,"Option '%s' expects an integer value" ,name );
633+ elog (elevel ,"option '%s' expects an integer value" ,name );
633634return false;
634635}
635636if (intval < conf -> min || intval > conf -> max )
636637{
637- elog (elevel ,"Option '%s' value %d is outside"
638+ elog (elevel ,"option '%s' value %d is outside"
638639" of permissible range [%d .. %d]" ,
639640name ,intval ,conf -> min ,conf -> max );
640641return false;
@@ -657,12 +658,12 @@ set_config_option(const char * name, const char * value, GucContext
657658
658659if (!parse_real (value ,& dval ))
659660{
660- elog (elevel ,"Option '%s' expects a real number" ,name );
661+ elog (elevel ,"option '%s' expects a real number" ,name );
661662return false;
662663}
663664if (dval < conf -> min || dval > conf -> max )
664665{
665- elog (elevel ,"Option '%s' value %g is outside"
666+ elog (elevel ,"option '%s' value %g is outside"
666667" of permissible range [%g .. %g]" ,
667668name ,dval ,conf -> min ,conf -> max );
668669return false;
@@ -683,7 +684,7 @@ set_config_option(const char * name, const char * value, GucContext
683684{
684685if (conf -> parse_hook && !(conf -> parse_hook )(value ))
685686{
686- elog (elevel ,"Option '%s' rejects value '%s'" ,name ,value );
687+ elog (elevel ,"invalid value for option '%s': '%s'" ,name ,value );
687688return false;
688689}
689690if (DoIt )
@@ -824,6 +825,9 @@ ParseLongOption(const char * string, char ** name, char ** value)
824825if (* cp == '-' )
825826* cp = '_' ;
826827}
828+
829+
830+
827831#ifdef ENABLE_SYSLOG
828832bool
829833check_facility (const char * facility )