Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y954G-0007zF-Et for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jan 2015 04:51:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y954F-0003fk-K9 for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jan 2015 04:51:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y954D-0003fb-Mf for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 04:51:29 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9549-0003as-EM for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 04:51:28 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 0478DFDA578 for ; Wed, 7 Jan 2015 20:51:23 -0800 (PST) Date: Wed, 7 Jan 2015 21:51:22 -0700 (MST) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1420692682829-5833277.post@n5.nabble.com> In-Reply-To: <20150108004400.11502.38491@wrigleys.postgresql.org> References: <20150108004400.11502.38491@wrigleys.postgresql.org> Subject: Re: BUG #12460: Extracting epoch from timestamp string incorrectly assumes "with time zone" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) 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 adeconsulting wrote > The following bug has been logged on the website: > > Bug reference: 12460 > Logged by: Alan Edel > Email address: > adeconsulting@ > PostgreSQL version: 9.3.5 > Operating system: FreeBSD 9.3 > Description: > > 8.3.6 queries using "timestamp" and "timestamptz" casting both give the > same > result: > > select extract(epoch from cast('2015/01/07 14:00:00' as timestamp)); > date_part > ------------ > 1420668000 > (1 row) > > select extract(epoch from cast('2015/01/07 14:00:00' as timestamptz)); > date_part > ------------ > 1420668000 > (1 row) > > However, 9.3.5 gives different results, the first one appears to be > incorrect: > > select extract(epoch from cast('2015/01/07 14:00:00' as timestamp)); > date_part > ------------ > 1420639200 > (1 row) > > select extract(epoch from cast('2015/01/07 14:00:00' as timestamptz)); > date_part > ------------ > 1420668000 > (1 row) Intentional behavior change in 9.2 http://www.postgresql.org/docs/9.2/interactive/release-9-2.html David J. -- View this message in context: http://postgresql.nabble.com/BUG-12460-Extracting-epoch-from-timestamp-string-incorrectly-assumes-with-time-zone-tp5833256p5833277.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs