From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
Cc: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Milen A(dot) Radev" <milen(at)radev(dot)net>, pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [SQL] Interval subtracting |
Date: | 2006-03-01 20:27:46 |
Message-ID: | 200603012027.k21KRk423759@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches pgsql-sql |
Scott Marlowe wrote:
> On Wed, 2006-03-01 at 14:18, Bruce Momjian wrote:
> > Stephan Szabo wrote:
> > > > justify_days doesn't currently do anything with this result --- it
> > > > thinks its charter is only to reduce day components that are >= 30 days.
> > > > However, I think a good case could be made that it should normalize
> > > > negative days too; that is, the invariant on its result should be
> > > > 0 <= days < 30, not merely days < 30.
> > >
> > > What about cases like interval '1 month -99 days', should that turn into
> > > interval '-3 mons +21 days' or '-2 mons -9 days'?
> >
> > I think it should be the later. It is best to have a single sign, and I
> > think it is possible in all cases:
> >
> > '2 mons -1 days'
> >
> > could be adjusted to '1 mons 29 days'.
>
> There's a part of me that thinks the WHOLE THING should be positive or
> negative:
>
> -(2 months 1 day)
But it isn't '-2 months, -1 day'. I think what you are saying is what I
am saying, that we should make the signs consistent.
--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-01 20:28:11 | Re: [SQL] Interval subtracting |
Previous Message | Mark Kirkwood | 2006-03-01 20:21:30 | Re: pg_config, pg_service.conf, postgresql.conf .... |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-01 20:28:11 | Re: [SQL] Interval subtracting |
Previous Message | Scott Marlowe | 2006-03-01 20:21:14 | Re: [SQL] Interval subtracting |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-01 20:28:11 | Re: [SQL] Interval subtracting |
Previous Message | Scott Marlowe | 2006-03-01 20:21:14 | Re: [SQL] Interval subtracting |