SQLite Forum

about "strict" mode
Dear team,

I am following the SQLite timeline and have seen your efforts about introducing a strict mode to SQLite. First of all, thanks for that.

I remember that some time ago (probably in the old mailing list) there's been a suggestion for strict mode using a pragma statement. Have you considered this suggestion? (As far as I understand, the implementation used now requires "strict" in the table definition.)

Imho, a pragma had some major advantages:

1. Those who like strict handling could easily enable it for every table in every database by just setting "pragma strict=true" when opening the connection. Existing databases/tables don't need to be changed. Adding the pragma to .sqliterc would make SQLite-CLI always operate in strict mode.

2. Foreign key enforcement could be included. Currently, it's not clear to me how "mixed" tables would behave: Do I need the referencing or the referenced table to be strict, or both?

3. The "create table" syntax wouldn't diverge from standard SQL. No need to take care when importing SQL dumps.

4. Enforcing strings to be declared in single quotes and identifiers in double quotes could be enabled as well; not only for the table declaration, but for any other statement (especially SELECT) as well.

As the feature hasn't been released yet, maybe one could reconsider the implementation. What do others think here?