Re: Setting week starting day

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: Omar Eljumaily <omar2(at)omnicode(dot)com>
Cc: Ted Byers <r(dot)ted(dot)byers(at)rogers(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Setting week starting day
Date: 2007-03-09 23:25:50
Message-ID: 87fy8eatj5.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Omar Eljumaily <omar2(at)omnicode(dot)com> writes:

> Ted, my reason for asking the question that I believe precipitated this thread
> was that I wanted a single sql statement that aggregated time data by week.
> Yes, I could do the aggregation subsequently in my own client side code, but
> it's easier and less error prone to have it done by the server.

If you work closer to the data you have more efficiency. To do what you want
you can write a function using plpgsql -- I've posted some ideas -- and that
is not hard at all.

But if there was something to make it easier to write this it would be great ;-)

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2007-03-09 23:32:52 Re: Setting week starting day
Previous Message Jorge Godoy 2007-03-09 23:22:14 Re: Setting week starting day