From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christoph Berg <myon@debian.org>
Cc: pablopumarino@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14294: Problem in generate series between dates
Date: Wed, 31 Aug 2016 23:07:50 +0100
Message-ID: <878tvc4nk4.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <15294.1472679204@sss.pgh.pa.us>
References: <20160824182920.15681.52285@wrigleys.postgresql.org>
<28256.1472064660@sss.pgh.pa.us>
<87oa4i9d8w.fsf@news-spur.riddles.org.uk>
<31168.1472069440@sss.pgh.pa.us>
<20160831153737.xubrne5yzfedscym@msg.df7cb.de>
<87d1ko4t69.fsf@news-spur.riddles.org.uk>
<15294.1472679204@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> The lack of generate_series(date,date,integer) is sometimes
>> annoying, even though it can be worked around using the
>> timestamp-without-timezone variant of generate_series.
Tom> Or you can do it with "base_date + generate_series(integer...)".
Tom> I think we looked at this when the timestamp generate_series
Tom> functions were put in, and were worried about overloading the name
Tom> so far that common use-cases would get ambiguous-function
Tom> failures. If that can be shown not to happen, though, it'd be
Tom> worth adding such a function IMO.
I don't see why there would be ambiguity. date_part already has
overloads for every date/time type without causing any issues (but
date_trunc does not, which is another source of subtle timezone bugs).
Some experimentation with creating
pg_catalog.generate_series(date,date,integer) and trying the usual
use-cases doesn't seem to turn up any issues. Looking at the list of
implicit casts also doesn't suggest that there would be any problems.
--
Andrew (irc:RhodiumToad)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, myon@debian.org, pablopumarino@gmail.com
Subject: Re: BUG #14294: Problem in generate series between dates
In-Reply-To: <878tvc4nk4.fsf@news-spur.riddles.org.uk>
References: <20160824182920.15681.52285@wrigleys.postgresql.org> <28256.1472064660@sss.pgh.pa.us> <87oa4i9d8w.fsf@news-spur.riddles.org.uk> <31168.1472069440@sss.pgh.pa.us> <20160831153737.xubrne5yzfedscym@msg.df7cb.de> <87d1ko4t69.fsf@news-spur.riddles.org.uk> <15294.1472679204@sss.pgh.pa.us> <878tvc4nk4.fsf@news-spur.riddles.org.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