Thread: Interval Patch

Interval Patch

From
Larry Rosenman
Date:
This is against 7.3.3 sources, but it fixes the TODO
* Have SELECT '13 minutes'::interval display zero seconds in ISO
      datestyle

*** datetime.c.orig    Sat May  3 23:30:35 2003
--- datetime.c    Tue Jun 24 15:54:39 2003
***************
*** 3498,3504 ****
                      is_nonzero = TRUE;
                  }
                  /* otherwise, integer seconds only? */
!                 else if (tm->tm_sec != 0)
                  {
                      sprintf(cp, ":%02d", abs(tm->tm_sec));
                      cp += strlen(cp);
--- 3498,3504 ----
                      is_nonzero = TRUE;
                  }
                  /* otherwise, integer seconds only? */
!                 else
                  {
                      sprintf(cp, ":%02d", abs(tm->tm_sec));
                      cp += strlen(cp);

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



Attachment

Re: Interval Patch

From
Tom Lane
Date:
Larry Rosenman <ler@lerctr.org> writes:
> This is against 7.3.3 sources, but it fixes the TODO
> * Have SELECT '13 minutes'::interval display zero seconds in ISO
>       datestyle

Applied to CVS tip, along with requisite regression test updates.
I'm unwilling to apply to 7.3 branch though, since it's a definitional
change rather than a true bug.

            regards, tom lane

Re: Interval Patch

From
Bruce Momjian
Date:
Tom has applied a fix for this.

---------------------------------------------------------------------------

Larry Rosenman wrote:
> This is against 7.3.3 sources, but it fixes the TODO
> * Have SELECT '13 minutes'::interval display zero seconds in ISO
>       datestyle
>
> *** datetime.c.orig    Sat May  3 23:30:35 2003
> --- datetime.c    Tue Jun 24 15:54:39 2003
> ***************
> *** 3498,3504 ****
>                       is_nonzero = TRUE;
>                   }
>                   /* otherwise, integer seconds only? */
> !                 else if (tm->tm_sec != 0)
>                   {
>                       sprintf(cp, ":%02d", abs(tm->tm_sec));
>                       cp += strlen(cp);
> --- 3498,3504 ----
>                       is_nonzero = TRUE;
>                   }
>                   /* otherwise, integer seconds only? */
> !                 else
>                   {
>                       sprintf(cp, ":%02d", abs(tm->tm_sec));
>                       cp += strlen(cp);
>
> --
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
>
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073