Changing constant in src/include/miscadmin.h - Mailing list pgsql-hackers

From Yury Bokhoncovich
Subject Changing constant in src/include/miscadmin.h
Date
Msg-id Pine.LNX.4.33.0203201902450.12114-100000@panda.center-f1.ru
Whole thread Raw
List pgsql-hackers
Hello!

Is it valid to change a constant in src/include/miscadmin.h?

===========================
@@ -150,10 +150,10 @@
#define MAXTZLEN               10              /* max TZ name len, not counting tr. null */

-#define USE_POSTGRES_DATES             0#define USE_ISO_DATES                  1#define USE_SQL_DATES
2#defineUSE_GERMAN_DATES               3
 
+#define USE_POSTGRES_DATES             4
extern int     DateStyle;extern bool EuroDates;
===========================

This can make easy parsing of date style in parse_datestyle_internal
function (src/backend/commands/variable.c) in this way:

datestyle=0;
if () datestyle=USE_xxx
...
if (!datestyle) elog(ERROR

-- 
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: byg@center-f1.ru.
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.




pgsql-hackers by date:

Previous
From: 'Ben Grimm'
Date:
Subject: Re: [BUGS] Bug #613: Sequence values fall back to previously chec
Next
From: "'Ben Grimm'"
Date:
Subject: Re: [BUGS] Bug #613: Sequence values fall back to previously chec