Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcdOW-0005w3-In for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 18:59:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bcdOW-00028Z-4r for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 18:59:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bcdOV-00028T-QZ for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 18:59:23 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcdOS-0004xU-OC for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 18:59:23 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id u7OIxAv06004; Wed, 24 Aug 2016 11:59:10 -0700 Subject: Re: BUG #14294: Problem in generate series between dates To: pablopumarino@gmail.com, pgsql-bugs@postgresql.org References: <20160824182920.15681.52285@wrigleys.postgresql.org> From: John R Pierce Message-ID: <56e85f55-6de8-3de6-65e6-12eca07074aa@hogranch.com> Date: Wed, 24 Aug 2016 11:59:16 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160824182920.15681.52285@wrigleys.postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -2.1 (--) 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 On 8/24/2016 11:29 AM, pablopumarino@gmail.com wrote: > SELECT generate_series('2016-08-01', '2016-08-31', '1 > day'::interval)::date > > it gives me the corresponding list of days but for some reason it misses the > day 2016-08-31. > -I've tried this with other months and it works correctly, also if I use it > for the same dates but on 2015 it works fine. > -This started failing after we upgraded our system to the version 9.5.4, > I've tryed it in an older release that we had installed and it worked. I would write that as... select generate_series(timestamp '2016-08-01', timestamp '2016-08-31', interval '1 day')::date; the notation type 'string value' is a native constant in that type, while the notation 'string value'::type generates a text constant and typecasts it. -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs