Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcd5c-0004nQ-6m for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 18:39:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bcd5b-0006BQ-Pt for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 18:39:51 +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 1bcd4y-0005Tf-I9 for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 18:39:12 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bcd4v-0004Ww-Pj for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 18:39:11 +0000 Received: from localhost ([127.0.0.1]:14930 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1bcd4t-000Nf4-M2; Wed, 24 Aug 2016 18:39:07 +0000 From: Andrew Gierth To: pablopumarino@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14294: Problem in generate series between dates In-Reply-To: <20160824182920.15681.52285@wrigleys.postgresql.org> (pablopumarino@gmail.com's message of "Wed, 24 Aug 2016 18:29:20 +0000") Message-ID: <871t1eau9v.fsf@news-spur.riddles.org.uk> References: <20160824182920.15681.52285@wrigleys.postgresql.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Wed, 24 Aug 2016 19:39:07 +0100 MIME-Version: 1.0 Content-Type: text/plain 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 >>>>> "pablopumarino" == pablopumarino writes: pablopumarino> SELECT generate_series('2016-08-01', '2016-08-31', '1 day'::interval)::date Does it work better if you do: SELECT generate_series(timestamp '2016-08-01', '2016-08-31', '1 day'::interval)::date; ? (Your version is using timestamp with time zone, which is probably not a good idea) Also, what is the output you get for: SELECT d, d::date FROM generate_series('2016-08-01', '2016-08-31', '1 day'::interval) AS d; -- 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