Re: Temporal Units

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Temporal Units
Date: 2007-04-29 02:41:42
Message-ID: Pine.LNX.4.64.0704281937000.17123@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2007-04-29 02:52:10 DRI in Docs?
Previous Message David Lee Lambert 2007-04-29 01:07:13 Re: Indirect access to data, given table name as a string