pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: date range to set of dates expansion
Date: Thu, 19 Jan 2012 15:11:46 +0000
Message-ID: <201201191511.46076.gary.stainburn@ringways.co.uk> (raw)
In-Reply-To: <87mx9kks84.fsf@hf.protecting.net>
References: <201201190713.34333.gary.stainburn@ringways.co.uk>
	<87mx9kks84.fsf@hf.protecting.net>

On Thursday 19 January 2012 08:32:27 hari.fuchs@gmail.com wrote:
>
> Why don't you just use the built-in PostgreSQL function for that?
>
> SELECT aid, asid,
>        generate_series (asdate, afdate, INTERVAL '1 day')::date AS asdate,
>        acomments
> FROM tbl

1) because I didn't know about it
2) because the version of postgresql I run doesn't support it.

However, it does exactly what I need so thanks very much.  

I'll be upgrading my live server as soon as possible, but in the meantime can 
anyone suggest  a way I can do the same thing using Postgresql 8.1 until I 
can evaluate 8.4 on my live systems?

-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 



view thread (10+ messages)  latest in thread

Message-ID: <201201191511.46076.gary.stainburn@ringways.co.uk>
Permalink:  ../201201191511.46076.gary.stainburn@ringways.co.uk/
Also on:    postgresql.org/message-id/201201191511.46076.gary.stainburn@ringways.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gary.stainburn@ringways.co.uk
  Subject: Re: date range to set of dates expansion
  In-Reply-To: <201201191511.46076.gary.stainburn@ringways.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox