DB design document

Roland Roberts roland@astrofoto.org
13 Dec 2000 22:02:35 -0500


>>>>> "dm" == David Merrill <dmerrill@lupercalia.net> writes:

    dm> On Wed, Dec 13, 2000 at 06:41:34PM -0800, Dave Peticolas wrote:
    >> David Merrill writes:
    >> > On Thu, Dec 14, 2000 at 12:08:24PM +1000, Phillip Shelton wrote:
    >> > > 
    [...]
    >> > > Do we need to worry about transaction_time here?
    >> > 
    >> > I'm not sure about Postgres, but in Oracle a date field is really a
    >> > date+time field. But I'll change the doc so it's obvious.
    >> 
    >> GnuCash currently allows any date/time field to be set at nanosecond
    >> resolution. It seems a bit overkill to me, so we might want to think
    >> about dropping that, but it's something to keep in mind because right
    >> now the api for it is there.

    dm> We will be limited by the precision of the database. I'm not sure
    dm> about Postgres' precision, but it is probably millisecond or so.

Oracle date type is date+time and is accurate to one second, at least
on the hosts I've had access to.  Postgres has date, time, and
timestamp types.  "date" is for dates only, accurate to the day;
"time" is for time of day only, accurate to the microsecond, and
timestamp is for date+time, accurate to the microsecond (range from
4713 BC to AD 1465001).

roland
-- 
		       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
rbroberts@acm.org                          Forest Hills, NY 11375