From: Tom Lane <tgl@sss.pgh.pa.us>
To: daniel@heroku.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7498: Questionable interval parsing when in the form 'n m days'
Date: Wed, 15 Aug 2012 20:19:49 -0400
Message-ID: <26220.1345076389@sss.pgh.pa.us> (raw)
In-Reply-To: <E1T1mfh-0002ha-Rq@wrigleys.postgresql.org>
References: <E1T1mfh-0002ha-Rq@wrigleys.postgresql.org>
daniel@heroku.com writes:
> select '1 5 hours'::interval = '1 day 5 hours'::interval;
> ?column?
> ----------
> t
> (1 row)
> I think that the first spelling, a unit-less '1', should not be accepted.
Not sure I agree. The syntax '1 05:00' is required by spec to mean
'1 day 5 hours 0 minutes'. I would take that to mean that a unitless
number directly to the left of an hours field is days. Anyway, the
code in DecodeInterval is treating these cases the same.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, daniel@heroku.com
Subject: Re: BUG #7498: Questionable interval parsing when in the form 'n m days'
In-Reply-To: <26220.1345076389@sss.pgh.pa.us>
References: <E1T1mfh-0002ha-Rq@wrigleys.postgresql.org> <26220.1345076389@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox