Re: Query design assistance - getting daily totals

From: Paul Lambert <paul(dot)lambert(at)reynolds(dot)com(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Query design assistance - getting daily totals
Date: 2007-12-12 06:39:48
Message-ID: 475F8234.5090907@reynolds.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

A. Kretschmer wrote:
> am Wed, dem 12.12.2007, um 10:34:35 +0900 mailte Paul Lambert folgendes:
>> year_id integer
>> month_id integer
>> working_day integer
>
> Why this broken data types? We have date and timestamp[tz].
>
>

It's a financial application which needs to work using a concept of
'financial periods' which may not necessarily correspond to calendar
months and it's much easier to manage in this way than it is to merge it
all together using a date field. Eg, 1st January may actually be the
15th 'working day' of the 9th 'financial period' - however looking at
just a date of jan-1 there is no way of knowing this and it's the
periods that matter more so than the actual date.

I've given the function method a try and it looks to work efficiently
enough.

P.

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2007-12-12 07:29:46 Re: Query design assistance - getting daily totals
Previous Message A. Kretschmer 2007-12-12 06:31:42 Re: Query design assistance - getting daily totals