Re: [sqlite] [EXTERNAL] Inconsistency of CREATE/DROP TABLE with attached DBs

2020-03-04 Thread Hick Gunter
Addendum: Note that CREATE TABLE has an optional schema name which must be one 
of

- main (which is the default)
- temp (which is the same as specifying TEMP or TEMPORARY between CREATE and 
TABLE)
- the name of an attached database

See https://sqlite.org/lang_createtable.html


-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Hick Gunter
Gesendet: Donnerstag, 5. März 2020 08:48
An: SQLite mailing list 
Betreff: Re: [sqlite] [EXTERNAL] Inconsistency of CREATE/DROP TABLE with 
attached DBs

I don't see any inconsistency here.

1) implicit attach of a.sqlite as main and create a.t1
2) implcit attach b.sqlite as main, attach a.sqlite as a and create (main).t1 
(in b.sqlite)
3) implicit attach c.sqlite as main, attaxh a.sqlite as a and drop the only 
table named t1 from a

c.sqlite never contains a table t1. If it did, then step 3 would drop c.t1 in 
step 3

see https://sqlite.org/lang_naming.html

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von no...@null.net
Gesendet: Mittwoch, 4. März 2020 18:31
An: SQLite mailing list 
Betreff: [EXTERNAL] [sqlite] Inconsistency of CREATE/DROP TABLE with attached 
DBs

I ran into an inconsistency? between CREATE and DROP TABLE today:

# Pipe this example through sed -e 's/^ *//' before running through
# a shell
#
# 1. Set up table a.t1
rm -f a.sqlite b.sqlite c.sqlite

cat <https://www.sqlite.org/lang_naming.html

I think I would also appreciate a pragma that requires full schema paths for a) 
modification statements and/or b) all statements.

--
Mark Lawrence
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Inconsistency of CREATE/DROP TABLE with attached DBs

2020-03-04 Thread Hick Gunter
I don't see any inconsistency here.

1) implicit attach of a.sqlite as main and create a.t1
2) implcit attach b.sqlite as main, attach a.sqlite as a and create (main).t1 
(in b.sqlite)
3) implicit attach c.sqlite as main, attaxh a.sqlite as a and drop the only 
table named t1 from a

c.sqlite never contains a table t1. If it did, then step 3 would drop c.t1 in 
step 3

see https://sqlite.org/lang_naming.html

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von no...@null.net
Gesendet: Mittwoch, 4. März 2020 18:31
An: SQLite mailing list 
Betreff: [EXTERNAL] [sqlite] Inconsistency of CREATE/DROP TABLE with attached 
DBs

I ran into an inconsistency? between CREATE and DROP TABLE today:

# Pipe this example through sed -e 's/^ *//' before running through
# a shell
#
# 1. Set up table a.t1
rm -f a.sqlite b.sqlite c.sqlite

cat <https://www.sqlite.org/lang_naming.html

I think I would also appreciate a pragma that requires full schema paths for a) 
modification statements and/or b) all statements.

--
Mark Lawrence
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users