From f46571165d0d0e82b36e1f4ca2a10efb7255e3e6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 19 Feb 2000 22:10:47 +0000 Subject: 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. --- src/include/commands/variable.h | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'src/include/commands/variable.h') 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 */ -- cgit v1.2.3