Re: [BUGS] to_timestamp not stable if date string shorter than - Mailing list pgsql-patches

From Karel Zak
Subject Re: [BUGS] to_timestamp not stable if date string shorter than
Date
Msg-id 20030903154835.GE5820@zf.jcu.cz
Whole thread Raw
In response to Re: [BUGS] to_timestamp not stable if date string shorter than  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Wed, Sep 03, 2003 at 11:10:33AM -0400, Tom Lane wrote:
> Karel Zak <zakkr@zf.jcu.cz> writes:
> >  Fixed. All tests  passed. My court  is without  ball now. The  patch is
> >  attached.
>
> Applied to CVS HEAD.  I also applied just the
>
> +        if (flag == FROM_CHAR && *s=='\0')
> +            break;
>
> part to the 7.3 branch --- the rest of the changes didn't apply cleanly,
> and seemed unrelated anyway.  This fixes the immediate complaint, but

 Hmm..  but  the patch  fix  another  small  bug  which I  found  today.
 Please,  if  you don't  submit  all  of the  patch,  fix  two lines  in
 do_to_timestamp():

 line: 2997 must be:
    incache = TRUE;

 line: 3039 must be:
    if (!incache)

 (Note:  this another  bug appear  if  format picture  for date/time  is
 greater than 128 bytes -- for this probably nobody find it yet)

> if there's some reason to apply the rest to 7.3.*, would you submit
> an additional patch against that branch?

 Yep.

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] to_timestamp not stable if date string shorter than
Next
From: Karel Zak
Date:
Subject: 7.3: [BUGS] to_timestamp not stable if date string shorter than