Re: BUG #1671: Long interval string representation rejected - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1671: Long interval string representation rejected
Date
Msg-id 28893.1116479154@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1671: Long interval string representation rejected  (Neil Conway <neilc@samurai.com>)
Responses Re: BUG #1671: Long interval string representation rejected  (Neil Conway <neilc@samurai.com>)
List pgsql-bugs
Neil Conway <neilc@samurai.com> writes:
> Tom Lane wrote:
>> I believe that the reason for the local buffer is to hold a downcased
>> version of the input, which we can compare to the all-lower-case tables
>> of relevant keywords.

> Well, that's one of the reasons, but not the only one. For example, how
> do you parse '17 minutes31 seconds'::interval without either a working
> buffer or the ability to resize the input buffer?

Sorry, s/downcased/downcased and null-terminated/.  I have not read the
parsing code in question lately, but offhand it seems like transferring
one token at a time into a work buffer isn't a completely broken idea...

> On closer inspection, the current code seems to get this wrong as well
> :-(

Wouldn't be surprised :-(

            regards, tom lane

pgsql-bugs by date:

Previous
From: Neil Conway
Date:
Subject: Re: BUG #1671: Long interval string representation rejected
Next
From: Neil Conway
Date:
Subject: Re: BUG #1671: Long interval string representation rejected