>   Reading the RFC only proves my point.  SQLite v3 is older than that
>   doc, and it pretty much admits the cat was out of the bag a long
time
>   ago.  There are a ton of optional and might/may/could sections that
>   event the format they define has a lot of holes in it (i.e. headers,
>   or no headers?).

I read the RFC last night and even took a stab at adding it to the
.import method in the sqlite command line.  But pretty quickly holes
appeared.  For example, the RFC says that everything between the commas
is supposed to be part of the field, including white space.  Normally I
trim the white space unless it's quoted.  Still, the RFC does not
address how to handle rows like this:

1234,abc"123",abc
1235,""123,abc

What are you supposed to do with those?  It is not clear.  Also, are you
supposed to strip the quotes upon consuming the field?  Are you supposed
to un-escape escaped quotes?
 
"1234" -> 1234 or "1234" ?
"15""" -> 15" or 15"" or "15""" or "15"" ?

Seems to me if you strip quotes, you have to un-escape any escaped
quotes in the field.  If you don't strip quotes, then you can't
un-escape anything in the field because it leads to bazaar edge cases.
Then there is the matter of white space outside the quotes.  The RFC
seems silent on all these issues, though the ABNF grammar implies that
white space outside quotes is not tolerated, which could lead to
considerable user surprise.

RW

Ron Wilson, Engineering Project Lead
(o) 434.455.6453, (m) 434.851.1612, www.harris.com

HARRIS CORPORATION   |   RF Communications Division
assuredcommunications(tm)


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to