diff options
author | Tom Lane | 2006-10-16 19:58:27 +0000 |
---|---|---|
committer | Tom Lane | 2006-10-16 19:58:27 +0000 |
commit | 0b35b01e7ab0bae4eca85d434f884259e3187bcd (patch) | |
tree | 809f0557c5520edb2b0854aa7741960fccfd15e1 /src/timezone/pgtz.h | |
parent | a2ebf81913b00f2e9d0f2dcefb99f99596a756b9 (diff) |
Arrange for timezone names to be recognized case-insensitively; for
example SET TIME ZONE 'america/new_york' works now. This seems a good
idea on general user-friendliness grounds, and is part of the solution
to the timestamp-input parsing problems I noted recently.
Diffstat (limited to 'src/timezone/pgtz.h')
-rw-r--r-- | src/timezone/pgtz.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/timezone/pgtz.h b/src/timezone/pgtz.h index b58613bb628..0e1a06f82d4 100644 --- a/src/timezone/pgtz.h +++ b/src/timezone/pgtz.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.17 2006/07/11 13:54:25 momjian Exp $ + * $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.18 2006/10/16 19:58:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,6 @@ #include "tzfile.h" #include "pgtime.h" -extern char *pg_TZDIR(void); #define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) @@ -55,11 +54,17 @@ struct state struct pg_tz { + /* TZname contains the canonically-cased name of the timezone */ char TZname[TZ_STRLEN_MAX + 1]; struct state state; }; -int tzload(const char *name, struct state * sp); -int tzparse(const char *name, struct state * sp, int lastditch); + +/* in pgtz.c */ +extern int pg_open_tzfile(const char *name, char *canonname); + +/* in localtime.c */ +extern int tzload(const char *name, char *canonname, struct state *sp); +extern int tzparse(const char *name, struct state *sp, int lastditch); #endif /* _PGTZ_H */ |