Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5Jyg-0001sG-1P for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 18:53:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W5Jye-0000Qq-VB for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 18:53:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5Jyb-0000MR-Rv; Mon, 20 Jan 2014 18:53:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5JyZ-0003lS-Hl; Mon, 20 Jan 2014 18:53:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s0KIrX7N032525; Mon, 20 Jan 2014 13:53:33 -0500 From: Tom Lane To: Jeevan Chalke cc: Robert Haas , Postgres-Bugs , PostgreSQL Hackers Subject: Re: [HACKERS] surprising to_timestamp behavior In-reply-to: References: <2726.1383062593@sss.pgh.pa.us> <9795.1389987385@sss.pgh.pa.us> Comments: In-reply-to Jeevan Chalke message dated "Mon, 20 Jan 2014 11:53:58 +0530" Date: Mon, 20 Jan 2014 13:53:33 -0500 Message-ID: <32524.1390244013@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) 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 Jeevan Chalke writes: >> I went to review this, and found that there's not actually a patch >> attached ... > Attached. Sorry for that. This looks good to me except for one thing: if the upcoming node is a DCH_FX action (ie, turn on fx_mode), I don't think we want to skip whitespace. The original coding had that bug too, but it was only exposed if the FX prefix was immediately preceded by whitespace in the format. It's a bit hard to think of useful cases where this would make a difference, because it turns out that from_char_parse_int contains an internal skip-whitespace action that's applied regardless of FX mode, so it really only matters for non-integer field types. I kinda think that maybe now we should remove that extra skip, or at least count the skipped whitespace against the field width, but did not experiment to see what the results would be. Committed with that change and some cosmetic adjustments. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs