about date/time parser

Started by Gevik Babakhanialmost 18 years ago3 messages
#1Gevik Babakhani
pgdev@xs4all.nl

regarding http://archives.postgresql.org/pgsql-hackers/2008-02/msg00826.php

I was wondering why we have a custom written parser to parse the date/time
from/to string and vice versa?
Is there a historical reason? Would a yacc/lex parser be better?

Regards,
Gevik

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gevik Babakhani (#1)
Re: about date/time parser

"Gevik Babakhani" <pgdev@xs4all.nl> writes:

Would a yacc/lex parser be better?

Almost certainly neither workable nor an improvement if you did make it
work. Datetimes don't have enough structure to make yacc useful, and
it's not flexible enough either.

regards, tom lane

#3Gevik Babakhani
pgdev@xs4all.nl
In reply to: Tom Lane (#2)
Re: about date/time parser

Almost certainly neither workable nor an improvement if you
did make it work. Datetimes don't have enough structure to
make yacc useful, and it's not flexible enough either.

Understood. Thank you :)