1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Enhance the table_info pragma so that the pk column shows the order of the

columns in a multi-column primary key.

FossilOrigin-Name: 3076a89015071e9b40e728bd55160e3a6ed98820
This commit is contained in:
drh
2013-01-01 13:55:31 +00:00
parent 25846af3be
commit 384b7fe221
4 changed files with 29 additions and 15 deletions

View File

@ -534,12 +534,20 @@ do_test pragma-6.2.2 {
b DEFAULT (5+3),
c TEXT,
d INTEGER DEFAULT NULL,
e TEXT DEFAULT ''
e TEXT DEFAULT '',
UNIQUE(b,c,d),
PRIMARY KEY(e,b,c)
);
PRAGMA table_info(t5);
}
} {0 a TEXT 0 CURRENT_TIMESTAMP 0 1 b {} 0 5+3 0 2 c TEXT 0 <<NULL>> 0 3 d INTEGER 0 NULL 0 4 e TEXT 0 '' 0}
} {0 a TEXT 0 CURRENT_TIMESTAMP 0 1 b {} 0 5+3 2 2 c TEXT 0 <<NULL>> 3 3 d INTEGER 0 NULL 0 4 e TEXT 0 '' 1}
db nullvalue {}
do_test pragma-6.2.3 {
execsql {
CREATE TABLE t2_3(a,b INTEGER PRIMARY KEY,c);
pragma table_info(t2_3)
}
} {0 a {} 0 {} 0 1 b INTEGER 0 {} 1 2 c {} 0 {} 0}
ifcapable {foreignkey} {
do_test pragma-6.3.1 {
execsql {
@ -1619,5 +1627,3 @@ do_test 22.4.3 {
} {ok}
finish_test