Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6SwG-0000Xg-K4 for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Feb 2013 21:35:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U6SwF-0001ib-RG for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Feb 2013 21:35:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6Sos-0007yJ-BC for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 21:27:46 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6Soo-0007xU-Ew for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 21:27:46 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6Son-0004N4-2a for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 21:27:41 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1U6Som-0004Pz-RQ for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 21:27:40 +0000 Date: Fri, 15 Feb 2013 21:27:40 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7886: date_trunc(date) returning timestamptz instead of timestamp To: pgsql-bugs@postgresql.org From: nick.baxter@gmail.com X-Pg-Spam-Score: -1.0 (-) 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 The following bug has been logged on the website: Bug reference: 7886 Logged by: Nick Baxter Email address: nick.baxter@gmail.com PostgreSQL version: 9.0.3 Operating system: Linux 2.6.18 Description:=20=20=20=20=20=20=20=20 9.9.2. indicates that date_trunc can be called with a date value (which will be cast to a timestamp). And regardless of the input, that the result will be of type timestamp. When I call it with a date, I get a timestamp with time zone instead, as indicated by the psql output. # select date_trunc('month',date '2013-2-15'); date_trunc ------------------------ 2013-02-01 00:00:00-06 (1 row) --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs