Re: [sqlite] invalid column constraint ignored
On 6/12/17, gwennwrote: > invalid column constraints are ignored. This is a consequence of designing SQLite according to Postel's Law (https://en.wikipedia.org/wiki/Robustness_principle) which was very popular 17 years ago when SQLite was being designed, but nowadays has fallen out of favor. It cannot be changed now because doing so might break some of the millions of applications that were written against SQLite over the past nearly two decades and which make use of SQLite's liberal parsing policies. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] invalid column constraint ignored
Hello, I suppose it is a trade-off to make the parser light and fast. But invalid column constraints are ignored. sqlite> create table tbl (data text constraint x); postgres=# create table tbl (data text constraint x); ERROR: syntax error at or near ")" at character 41 sqlite> create table tbl (data text deferrable initially deferred); postgres=# create table tbl (data text deferrable initially deferred); ERROR: misplaced DEFERRABLE clause at character 29 sqlite> create table tbl (data text not null constraint x); postgres=# create table tbl (data text not null constraint x); ERROR: syntax error at or near ")" at character 50 Regards. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users