From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | Wolfgang Keller <wolfgang(dot)keller(dot)privat(at)gmx(dot)de> |
Cc: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Precision of time types |
Date: | 2007-11-14 12:28:07 |
Message-ID: | EF745B02-2519-4DAE-92B7-A3304F7C6CEC@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Nov 13, 2007, at 6:45 , Wolfgang Keller wrote:
> When/how is the internal storage method determined?
>
> Compile-time option?
Yes, depending on the --enable-integer-datetimes flag.
> So, do I need to use a numeric type for the seconds and define my
> own composite datetime column or can I use a properly parameterized
> built-in time type of PostgreSQL?
Are you looking at timestamps or durations? If you're looking at
timestamps, you could use timestamp(0) + an additional column to hold
the number of nanoseconds. If durations (mis-named intervals in SQL),
you could either store it as an interval(0) + an additional column
for nanoseconds, or perhaps the total number of seconds in a numeric
column.
As you suggest, you could wrap the two columns into a single
composite type.
Michael Glaesemann
grzm seespotcode net
From | Date | Subject | |
---|---|---|---|
Next Message | G. J. Walsh | 2007-11-14 20:09:37 | populating arrays with default values |
Previous Message | Devrim GÜNDÜZ | 2007-11-13 17:01:32 | Re: postgresql 8.1.10-1PGDG (32 bit) installaion on RHEL 4 |