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