Re: Temporal Units

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Temporal Units
Дата
Msg-id Pine.LNX.4.64.0704281937000.17123@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Temporal Units  ("Alexander Staubo" <alex@purefiction.net>)
Ответы Re: Temporal Units
Список pgsql-general
On Sun, 29 Apr 2007, Alexander Staubo wrote:

> This is a common enough problem. Three factors come to mind:
>
> (1) Can all your intervals be expressed in absolute time units, such as
> number of days? "Work shift" is a human concept whose length is defined by
> context.

Alexander,

   If the requirements were in days, weeks, and months I could probably find
a time unit that worked -- including the PostgreSQL-specific solution.
However, when a regulatory agencies requires sampling once per shift, there
may be 1, 2, or 3 shifts per day. I don't want to hard code the current
solution because the company may add or subtract shifts depending on
business conditions.

   I have a second column for 'interval_unit', but while that works it
strikes me as less-than-elegant SQL. However, it might be the pragmatic
answer, despite making it very difficult to do temporal arithmetic to see if
required sampling was done and entered in the application.

Thanks,

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

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

Предыдущее
От: David Lee Lambert
Дата:
Сообщение: Re: Indirect access to data, given table name as a string
Следующее
От: Rich Shepard
Дата:
Сообщение: DRI in Docs?