From f0811a74b37427d7ee5eee56b00f7f2ea323d7d6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 17 May 2002 01:19:19 +0000 Subject: Merge the last few variable.c configuration variables into the generic GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers. --- src/backend/utils/adt/datetime.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/backend/utils/adt/datetime.c') diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 1a908d9d6b7..d6e0358e817 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.89 2002/04/21 19:48:12 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.90 2002/05/17 01:19:18 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3571,11 +3571,17 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str) } /* EncodeInterval() */ -void -ClearDateCache(bool dummy) +/* GUC assign_hook for australian_timezones */ +bool +ClearDateCache(bool newval, bool doit, bool interactive) { int i; - for (i = 0; i < MAXDATEFIELDS; i++) - datecache[i] = NULL; + if (doit) + { + for (i = 0; i < MAXDATEFIELDS; i++) + datecache[i] = NULL; + } + + return true; } -- cgit v1.2.3