Re: empty text fields

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: empty text fields
Дата
Msg-id 20060628193318.GG6400@merkur.hilbert.loc
обсуждение исходный текст
Ответ на Re: empty text fields  ("Leif B. Kristensen" <leif@solumslekt.org>)
Ответы Re: empty text fields
Re: empty text fields
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Strange Behavior with Serializable Transcations
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: empty text fields