From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: empty text fields |
Date: | 2006-06-28 19:33:18 |
Message-ID: | 20060628193318.GG6400@merkur.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 28, 2006 at 06:25:22PM +0200, Leif B. Kristensen wrote:
> >> event_date CHAR(18) NOT NULL DEFAULT
> The event_date field is a "fuzzy date" construct. It will allow the
> storage of such dates as "1784", "ca. 1810", "May 1852", "1798 or
> 1799", "between 1820 and 1830" and so on. It's very useful in
> historical research to handle such dates meaningfully.
How and where do you handle the fuzziness of it ? In the
application ? We have to deal with the same thing in medical
history data and haven't yet satisfactorily solved it.
> By the way, I was also going to ask sometime if there's a better way to
> handle such a construct than an unspecified CHAR(18) column.
A composite type comes to mind. Tagged types (google for
"tagged_type") would probably help, too.
A "full-blown" implementation of a fuzzy timestamp type which
a) preserves the input/update timestamp
b) allows setting the accuracy of the value per row
c) allows for known "modifiers" and "terms" ("mid-summer", "second half of ...")
d) allows for an arbitrary textual addition ("ca.", "probably")
would be great. I know I should be helping to write one
instead of hoping someone does it for me. But I lack the
expertise to do it properly. I am willing to help, at any
rate, though.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
From | Date | Subject | |
---|---|---|---|
Next Message | Karsten Hilbert | 2006-06-28 19:49:20 | Re: empty text fields |
Previous Message | Martijn van Oosterhout | 2006-06-28 19:20:49 | Re: Strange Behavior with Serializable Transcations |