Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-09 Thread Dominique Devienne
On Fri, Jan 9, 2015 at 11:57 AM, Dominique Devienne wrote: > On Fri, Jan 9, 2015 at 11:35 AM, Niall O'Reilly > wrote: > >> At Thu, 08 Jan 2015 15:55:00 -0700, >> Keith Medcalf wrote: >> > >> > when you load a dump file you need to have that foreign >>

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-09 Thread Dominique Devienne
On Fri, Jan 9, 2015 at 11:35 AM, Niall O'Reilly wrote: > At Thu, 08 Jan 2015 15:55:00 -0700, > Keith Medcalf wrote: > > > > when you load a dump file you need to have that foreign > > key enforcement off in order to be able to load the database. This > > is because the

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-09 Thread Niall O'Reilly
At Thu, 08 Jan 2015 15:55:00 -0700, Keith Medcalf wrote: > > when you load a dump file you need to have that foreign > key enforcement off in order to be able to load the database. This > is because the tables and data are dumped in random order, not in > hierarchical order (parents of parents

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-08 Thread Keith Medcalf
It is correct. On the chance that you happen to have compiled your version of SQLite with Foreign Key enforcement turned on by default instead of off; or, a later versions decides to change the default to on rather than off; when you load a dump file you need to have that foreign key

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-08 Thread J Decker
On Thu, Jan 8, 2015 at 9:05 AM, Niall O'Reilly wrote: > At Thu, 8 Jan 2015 13:46:37 +, > Simon Slavin wrote: > > > > > > On 8 Jan 2015, at 1:38pm, Niall O'Reilly wrote: > > > > > I'ld have expected the foreign_keys pragma setting to have been > >

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-08 Thread Niall O'Reilly
At Thu, 8 Jan 2015 13:46:37 +, Simon Slavin wrote: > > > On 8 Jan 2015, at 1:38pm, Niall O'Reilly wrote: > > > I'ld have expected the foreign_keys pragma setting to have been > > preserved. > > That makes sense in terms of how a sensible user would expect SQLite >

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-08 Thread Simon Slavin
On 8 Jan 2015, at 1:38pm, Niall O'Reilly wrote: > I'ld have expected the foreign_keys pragma setting to have been > preserved. That makes sense in terms of how a sensible user would expect SQLite to behave. But unfortunately it's not what SQLite does. See section 2