4
4
* Support for grand unified configuration scheme, including SET
5
5
* command, configuration file, and command line options.
6
6
*
7
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.19 2000/11/14 01:15:02 momjian Exp $
7
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.20 2000/11/14 19:13:27 petere Exp $
8
8
*
9
9
* Copyright 2000 by PostgreSQL Global Development Group
10
10
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -41,8 +41,8 @@ extern int XLOGbuffers;
41
41
extern int XLOG_DEBUG ;
42
42
#ifdef ENABLE_SYSLOG
43
43
extern 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 );
46
46
#endif
47
47
48
48
/*
@@ -308,10 +308,11 @@ ConfigureNamesString[] =
308
308
309
309
{"unix_socket_group" , PGC_POSTMASTER , & Unix_socket_group ,
310
310
"" , NULL },
311
+
311
312
#ifdef ENABLE_SYSLOG
312
- {"syslog_facility" , PGC_SIGHUP , & Syslog_facility ,
313
+ {"syslog_facility" , PGC_POSTMASTER , & Syslog_facility ,
313
314
"LOCAL0" , check_facility },
314
- {"syslog_progid " , PGC_SIGHUP , & Syslog_progid ,
315
+ {"syslog_ident " , PGC_POSTMASTER , & Syslog_ident ,
315
316
"postgres" , NULL },
316
317
#endif
317
318
@@ -608,7 +609,7 @@ set_config_option(const char * name, const char * value, GucContext
608
609
bool boolval ;
609
610
if (!parse_bool (value , & boolval ))
610
611
{
611
- elog (elevel , "Option '%s' requires a boolean value" , name );
612
+ elog (elevel , "option '%s' requires a boolean value" , name );
612
613
return false;
613
614
}
614
615
if (DoIt )
@@ -629,12 +630,12 @@ set_config_option(const char * name, const char * value, GucContext
629
630
630
631
if (!parse_int (value , & intval ))
631
632
{
632
- elog (elevel , "Option '%s' expects an integer value" , name );
633
+ elog (elevel , "option '%s' expects an integer value" , name );
633
634
return false;
634
635
}
635
636
if (intval < conf -> min || intval > conf -> max )
636
637
{
637
- elog (elevel , "Option '%s' value %d is outside"
638
+ elog (elevel , "option '%s' value %d is outside"
638
639
" of permissible range [%d .. %d]" ,
639
640
name , intval , conf -> min , conf -> max );
640
641
return false;
@@ -657,12 +658,12 @@ set_config_option(const char * name, const char * value, GucContext
657
658
658
659
if (!parse_real (value , & dval ))
659
660
{
660
- elog (elevel , "Option '%s' expects a real number" , name );
661
+ elog (elevel , "option '%s' expects a real number" , name );
661
662
return false;
662
663
}
663
664
if (dval < conf -> min || dval > conf -> max )
664
665
{
665
- elog (elevel , "Option '%s' value %g is outside"
666
+ elog (elevel , "option '%s' value %g is outside"
666
667
" of permissible range [%g .. %g]" ,
667
668
name , dval , conf -> min , conf -> max );
668
669
return false;
@@ -683,7 +684,7 @@ set_config_option(const char * name, const char * value, GucContext
683
684
{
684
685
if (conf -> parse_hook && !(conf -> parse_hook )(value ))
685
686
{
686
- elog (elevel , "Option '%s' rejects value '%s'" , name , value );
687
+ elog (elevel , "invalid value for option '%s': '%s'" , name , value );
687
688
return false;
688
689
}
689
690
if (DoIt )
@@ -824,6 +825,9 @@ ParseLongOption(const char * string, char ** name, char ** value)
824
825
if (* cp == '-' )
825
826
* cp = '_' ;
826
827
}
828
+
829
+
830
+
827
831
#ifdef ENABLE_SYSLOG
828
832
bool
829
833
check_facility (const char * facility )
0 commit comments