Re: to_timestamp not stable if date string shorter than - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: to_timestamp not stable if date string shorter than
Date
Msg-id 20030902212526.F60896-100000@megazone.bigpanda.com
Whole thread Raw
In response to Re: to_timestamp not stable if date string shorter than  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, 3 Sep 2003, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > Replying to myself again:
> > In DCH_processor (formatting.c), it doesn't seem to stop if it's in the
> > middle of processing nodes but runs off the inout string, should the for
> > loop be something like:
> >  for (n=node,s=inout;n->type!=NODE_TYPE_END && *s!='\0';++n,++s) {
> > and get rid of the ++s at the bottom of the loop for safety?
>
> That wouldn't change the behavior, would it?

It would I believe, as soon as it reached a \0 it'd stop the loop, but
checking *s is probably the wrong thing to do when flag==TO_CHAR, so I
think that bailing to Karel is probably the right choice.

pgsql-bugs by date:

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