SQLite Forum

Parse error: unable to identify the object to be reindexed
Login

Parse error: unable to identify the object to be reindexed

(1) By anonymous on 2024-01-09 08:34:35 [source]

When executing REINDEX command on a temporary table, a parse error is returned. Please see the following case.

SQLite version 3.45.0 2024-01-08 19:55:40
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TEMPORARY TABLE t1 (c1 TEXT, PRIMARY KEY (c1));
sqlite> REINDEX t1;
Parse error: unable to identify the object to be reindexed

(2) By Stephan Beal (stephan) on 2024-01-09 08:56:43 in reply to 1 [link] [source]

When executing REINDEX command on a temporary table, a parse error is returned. Please see the following case.

Until this is resolved, if you need to do this in your application then changing the REINDEX to:

REINDEX temp.t1

works around it.

(3) By Richard Hipp (drh) on 2024-01-09 12:30:53 in reply to 2 [link] [source]

It has been this way for 20 years. Nobody has ever complained.

Nevertheless, beginning in the next release, an unqualified table or index name in the REINDEX command will locate the table or index in any schema. See check-in 97709ce2a1f5ae05.