Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfDfp-0000lw-Vp for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Aug 2016 22:07:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bfDfp-0001a5-DV for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Aug 2016 22:07:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bfDfo-0001Zm-RD for pgsql-bugs@postgresql.org; Wed, 31 Aug 2016 22:07:56 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bfDfl-00073F-Hn for pgsql-bugs@postgresql.org; Wed, 31 Aug 2016 22:07:55 +0000 Received: from localhost ([127.0.0.1]:45435 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1bfDfi-000GJA-Sa; Wed, 31 Aug 2016 22:07:50 +0000 From: Andrew Gierth To: Tom Lane Cc: Christoph Berg , pablopumarino@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14294: Problem in generate series between dates In-Reply-To: <15294.1472679204@sss.pgh.pa.us> (Tom Lane's message of "Wed, 31 Aug 2016 17:33:24 -0400") Message-ID: <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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Wed, 31 Aug 2016 23:07:50 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -3.4 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Tom" == Tom Lane 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