Closed
Bug 450769
Opened 17 years ago
Closed 17 years ago
pragma table_info does not support database-name.table-name argument
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
INVALID
People
(Reporter: mrinal.kant, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
This is needed to specify the table correctly in a scenario where more than one table with same name exist in the main db and the attached db(s)
Reproducible: Always
Steps to Reproduce:
1. Connect to a sqlite db,
2. then attach another db as "att", say. Suppose the attached db has a table "t1".
3. execute the following query:
pragma table_info("att"."t1")
Actual Results:
The following error is reported on executing the pragma query:
near ".": syntax error
Expected Results:
We should see the info from the specified tablename from the specified attached dbname. This is essential when the table name t1 may occur in the main db or another attached db too.
Observed in sqlite 3.5.9 in Gecko 1.9.0.1
| Reporter | ||
Comment 1•17 years ago
|
||
The same problem occurs with the following pragma queries too:
PRAGMA index_list
PRAGMA index_info
PRAGMA foreign_key_list
| Reporter | ||
Comment 2•17 years ago
|
||
OK. This is not a bug. Got the following response from the sqlite users mailing list:
Try PRAGMA [database.]table_info(table-name);
Most other databse specific PRAGMAs support the
databasealias. prefix, so does this one, although it isn't
documented in http://www.sqlite.org/pragma.html#schema.
It works.
So, this bug should be treated as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Updated•1 year ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•