Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeI4o-0004zi-V7 for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2013 04:52:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UeI4o-0003yA-ED for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2013 04:52:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeI4m-0003y2-Gp for pgsql-bugs@postgresql.org; Mon, 20 May 2013 04:52:00 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeI4Z-0003Fr-9L for pgsql-bugs@postgresql.org; Mon, 20 May 2013 04:51:59 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeI4Y-0005aw-GM for pgsql-bugs@postgresql.org; Mon, 20 May 2013 04:51:47 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UeI4T-0002Jz-9g for pgsql-bugs@postgresql.org; Mon, 20 May 2013 04:51:41 +0000 Date: Mon, 20 May 2013 04:51:41 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8170: alter user does not accept timestamp output format in certain datestyles and timezones. To: pgsql-bugs@postgresql.org From: chris.travers@gmail.com X-Pg-Spam-Score: 0.6 (/) 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: 8170 Logged by: Chris Travers Email address: chris.travers@gmail.com PostgreSQL version: 9.2.4 Operating system: Debian Linux Description:=20=20=20=20=20=20=20=20 I have a pl/pgsql function which calculates at imestamp and alters a user's password to be valid for 24 hours pending a password change. When the datestyle and timezone are set to certain settings this throws an exception. Here is an approximation without plpgsql: db=3D# show timezone; TimeZone=20=20=20 -------------- Asia/Jakarta (1 row) db=3D# show datestyle; DateStyle=20=20=20 --------------- Postgres, DMY (1 row) db=3D# select now(); now=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ------------------------------------- Mon 20 May 11:39:24.273508 2013 WIT (1 row) db=3D# select 'ALTER USER ' || quote_ident('chris') || ' with valid until '= || quote_literal(now() + '1 day'); ?column?=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ------------------------------------------------------------------------ ALTER USER chris with valid until 'Tue 21 May 11:41:14.58554 2013 WIT' (1 row) db=3D# ALTER USER chris with valid until 'Tue 21 May 11:41:14.58554 2013 WIT'; ERROR: invalid input syntax for type timestamp with time zone: "Tue 21 May 11:41:14.58554 2013 WIT" This worked before with different timezones with the same datestyle. Why is this failing? --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs