Skip site navigation (1) Skip section navigation (2)

Re: date range to set of dates expansion

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: date range to set of dates expansion
Date: 2012-01-19 15:11:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Thursday 19 January 2012 08:32:27 hari(dot)fuchs(at)gmail(dot)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 

In response to


pgsql-sql by date

Next:From: Gary StainburnDate: 2012-01-19 15:16:16
Subject: Re: date range to set of dates expansion
Previous:From: Samuel GendlerDate: 2012-01-19 10:33:34
Subject: Re: how to return whole table from Function not just the id integer column

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group