diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-19 22:10:47 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-19 22:10:47 +0000 |
commit | f46571165d0d0e82b36e1f4ca2a10efb7255e3e6 (patch) | |
tree | a35ea254ff94039fb4d4aaee6f2c588e90f15ef1 /src/include/commands/variable.h | |
parent | bd43ae0ecd607a22c321df57366c4b900e4e9c0f (diff) | |
download | postgresql-f46571165d0d0e82b36e1f4ca2a10efb7255e3e6.tar.gz postgresql-f46571165d0d0e82b36e1f4ca2a10efb7255e3e6.zip |
Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.
variable, instead calling same code in variable.c that is used to parse
SET DATESTYLE. Fix bug: although backend's startup datestyle had been
changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't
know about it. For consistency I have made the latter two reset to the
PGDATESTYLE-defined initial value, which may not be the same as the
compiled-in default of ISO.
Diffstat (limited to 'src/include/commands/variable.h')
-rw-r--r-- | src/include/commands/variable.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/include/commands/variable.h b/src/include/commands/variable.h index a5110e883f2..c9b39d93cb5 100644 --- a/src/include/commands/variable.h +++ b/src/include/commands/variable.h @@ -2,32 +2,16 @@ * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' * statements * - * $Id: variable.h,v 1.8 1998/10/08 18:30:27 momjian Exp $ + * $Id: variable.h,v 1.9 2000/02/19 22:10:43 tgl Exp $ * */ #ifndef VARIABLE_H #define VARIABLE_H 1 -enum DateFormat -{ - Date_Postgres, Date_SQL, Date_ISO -}; +extern bool SetPGVariable(const char *name, const char *value); +extern bool GetPGVariable(const char *name); +extern bool ResetPGVariable(const char *name); -/*-----------------------------------------------------------------------*/ -struct PGVariables -{ - struct - { - bool euro; - enum DateFormat format; - } date; -}; - -extern struct PGVariables PGVariables; - -/*-----------------------------------------------------------------------*/ -bool SetPGVariable(const char *, const char *); -bool GetPGVariable(const char *); -bool ResetPGVariable(const char *); +extern void set_default_datestyle(void); #endif /* VARIABLE_H */ |