Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YXxR4-0003eg-IZ for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Mar 2015 19:45:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YXxR3-00013a-LF for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Mar 2015 19:45:53 +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 1YXxR3-00013U-0a for pgsql-bugs@postgresql.org; Tue, 17 Mar 2015 19:45:53 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YXxQy-0007Ea-Sc for pgsql-bugs@postgresql.org; Tue, 17 Mar 2015 19:45:51 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YXxQv-0000eV-4m; Tue, 17 Mar 2015 15:45:45 -0400 Date: Tue, 17 Mar 2015 15:45:45 -0400 From: Bruce Momjian To: jan.mate@inf-it.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12872: Inconsistent processing of interval values Message-ID: <20150317194545.GF10492@momjian.us> References: <20150316230352.2730.12684@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150316230352.2730.12684@wrigleys.postgresql.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) 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 On Mon, Mar 16, 2015 at 11:03:52PM +0000, jan.mate@inf-it.com wrote: > works, but: > > testdb=> SELECT (now()-' +5 days -12 hours -1 second +1 day'::interval) AS > tstz; > ERROR: invalid input syntax for type interval: " +5 days -12 hours -1 > second +1 day" > LINE 1: SELECT (now()-' +5 days -12 hours -1 second +1 day'::interva... > > generates an error. Yes, I understand that writing '+5 days +1 day' is > "stupid" but it conforms the syntax in the documentation. Well, I think we have always had that restriction, and you are the first person to mention it. Are you thinking we should document this limitation? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs