Re: BUG #1671: Long interval string representation rejected

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: BUG #1671: Long interval string representation rejected
Дата
Msg-id 428C2467.6090904@samurai.com
обсуждение исходный текст
Ответ на Re: BUG #1671: Long interval string representation rejected  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #1671: Long interval string representation rejected  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> 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...

I wouldn't call it "broken", but I don't see how it could be done
without a significant refactoring of how datetime parsing is done, and
your handwaving has yet to convince me :) The gist of the current code is:

1. parse the input string into fields, which are arrays of pointers into
a working buffer, via ParseDateTime()
2. decode the fields as appropriate for the datatype via
DecodeInterval(), DecodeDatetime(), DecodeTimeOnly(), etc.

i.e. I don't see an easy way to do field decoding one field at a time.

-Neil

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1671: Long interval string representation rejected
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1671: Long interval string representation rejected