Thanks for your quick response!

On Mon, May 13, 2019 at 1:17 AM Simon Slavin <slav...@bigfraud.org> wrote:

> On 12 May 2019, at 11:56pm, Manuel Rigger <rigger.man...@gmail.com> wrote:
>
> > Is this intended?
>
> Yes.  Because the temp database disappears when you close your connection.
> So you would open a database and find that either a parent or a child table
> had disappeared.  Which would mean the database was corrupt.
>

I would not consider the database to be corrupt though, since the behavior
for a missing parent table is documented. For example, it is supported to
drop a parent table that is still referenced.


>
> Actually it's not limited to temp.  All FOREIGN KEY relationships must be
> between two tables in the same database.  Because if they were in different
> databases you might load one database and not the other.
>

As far as I understood, the main and temp databases are always loaded and
cannot be detached. But, as you pointed out, I can understand that this
makes sense in the general case.

Best,
Manuel
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to