It is comma then table-constraint. Check the direction of the arrow on that 
loop. You go past it on the main line, go down into the ,-circle, then follow 
the arrow left into the table-constraint box, then continue the loop clockwise 
to meet back up with the main line.


-----Original Message-----
From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On Behalf Of 
Tim McCormack
Sent: Wednesday, September 18, 2019 9:14 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: [sqlite] Documentation bug: CREATE TABLE diagram misplaces comma

In https://www.sqlite.org/lang_createtable.html the diagram for
create-table-stmt contains a parenthesized list of column-def and
table-constraint, which I'll represent in a pseudo-grammar here:

"(" <column-def> ("," <column-def>)* (<table-constraint> ",")* ")"

However, that would forbid (foo, bar, PRIMARY_KEY foo) and require
instead something like (foo, bar PRIMARY_KEY foo,).

The fix is to change the <table-constraint> "," loop to instead be
"," <table-constraint>.

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

Reply via email to