Re: Recurring and non recurring events.

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Kevin Waterson <kevin(dot)waterson(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recurring and non recurring events.
Date: 2015-12-26 19:30:58
Message-ID: 567EEAF2.1070304@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pleas don't top post - see comment at the bottom of this email.

On 27/12/15 01:03, Kevin Waterson wrote:
> Thanks, as I am new to postgres, I was unaware of this function.
> To go with this, I guess I will need a table with which to store
> intervals, start and end dates?
>
> eg
> CREATE table events(
> id serial primary key,
> start_timestamp timestamp,
> end_timestamp timestamp,
> interval
>
> with dateRange as
> (
> SELECT min(start_timestamp) as first_date, max(start_timestamp) as
> last_date
> FROM events
> )
> select
> generate_series(first_date, last_date, '1
> hour'::interval)::timestamp as date_hour
> from dateRange;
>
>
> or something??
>
> Kind regards
> Kevin
>
>
> On Sat, Dec 26, 2015 at 7:22 PM, Pavel Stehule
> <pavel(dot)stehule(at)gmail(dot)com <mailto:pavel(dot)stehule(at)gmail(dot)com>> wrote:
>
> Hi
>
> 2015-12-26 8:28 GMT+01:00 Kevin Waterson <kevin(dot)waterson(at)gmail(dot)com
> <mailto:kevin(dot)waterson(at)gmail(dot)com>>:
>
> I wish to set up a table of recurring, and non-recurring events.
> I have been looking at
> http://justatheory.com/computers/databases/postgresql/recurring_events.html
> which looks nice (complex but nice) and wonder if there was a
> better option for this in more recent pgsql versions.
>
>
[...]

In this list, the convention is to post replies at the end (with some
rare exceptions), or interspersed when appropriate, and to omit parts no
longer relevant.

The motivation of bottom posting like this: is that people get to see
the context before the reply, AND emails don't end up getting longer &
longer as people reply at the beginning forgetting to trim the now
irrelevant stuff at the end.

Cheers,
Gavin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-12-26 20:15:50 Re: Recurring and non recurring events.
Previous Message Bruno Wolff III 2015-12-26 17:59:42 Re: Recurring and non recurring events.