postgresql/src/backend
Marc G. Fournier 070381482f From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] backend/utils/adt/timestamp.c

Back to this timezone stuff.  The struct tm has a field (tm_gmtoff) which
is the offset from UTC (GMT is archaic BTW) in seconds.  Is this the
value you are looking for when you use timezone?  Note that this applies
to NetBSD but it does not appear to be in either ANSI C or POSIX.  This
looks like one of those things that is just going to have to be hand
coded for each platform.

Why not just store the values in UTC and use localtime instead of
gmtime when retrieving the value?

Also, you assume the time is returned as a 4 byte integer.  In fact,
there is not even any requirement that time be an integral value.  You
should use time_t here.

The input function seems unduly restrictive.  Somewhere in the sources
there is an input function that allows words for months.  Can't we do
the same here?

There is a standard function, difftime, for subtracting two times.  It
deals with cases where time_t is not integral.  There is, however, a
small performance hit since it returns a double and I don't believe
there is any system currently which uses anything but an integral for
time_t.  Still, this is technically the correct and portable thing to do.

The returns from the various comparisons should probably be a bool.
1997-03-25 09:25:33 +00:00
..
access Free memory allocated by command in the BlankPortal' HeapMemory context 1997-03-25 04:10:21 +00:00
bootstrap Date/Time updates from Thomas... 1997-03-14 23:21:12 +00:00
catalog Setting index' attributes attcacheoff to -1 in index_create(). 1997-03-24 07:39:47 +00:00
commands Fix call to index_create in DefineIndex. 1997-03-19 07:52:03 +00:00
executor From: Dan McGuirk <mcguirk@indirect.com> 1997-03-12 21:00:17 +00:00
lib Remove CFLAGS_SL from lib/Makefile 1997-01-14 02:35:34 +00:00
libpq Rather than make this a Linux test, we should just test for the existence 1997-03-25 08:25:47 +00:00
main Bring in Randy's NOROOT patch 1996-11-14 20:49:09 +00:00
nodes From: Dan McGuirk <mcguirk@indirect.com> 1997-03-12 21:00:17 +00:00
optimizer Patches for Vadim's multikey indexing... 1997-03-18 18:41:37 +00:00
parser From: Dan McGuirk <mcguirk@indirect.com> 1997-03-12 20:51:33 +00:00
port MOre univel port patches/files from: 1997-03-25 07:54:53 +00:00
postmaster From: Dan McGuirk <mcguirk@indirect.com> 1997-03-12 21:23:16 +00:00
regex Remove __P macro usage so it compiles without cdefs.h. 1996-12-15 09:21:37 +00:00
rewrite Change %ud to %u 1996-12-26 17:49:56 +00:00
storage From: Massimo Dal Zotto <dz@cs.unitn.it> 1997-03-15 01:23:58 +00:00
tcop - Renamed the variable names to something shorter, and I hope 1997-03-25 02:37:21 +00:00
tioga Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
utils From: "D'Arcy J.M. Cain" <darcy@druid.net> 1997-03-25 09:25:33 +00:00
Makefile Use $(LD_ADD) from Makefile.global instead of $(LDADD), which doesn't exist... 1997-03-25 08:14:25 +00:00