On Sun, May 9, 2010 at 6:18 AM, Oliver Lange <[email protected]>wrote:
>
> Hello,
>
> One thing i'm missing in PRAGMA table_info() is that i can't specify
> a database name, like: PRAGMA table_info(main.mytable);
>
The correct syntax is:
PRAGMA main.table_info(mytable);
>
> Problem: if a TEMPORARY TABLE is defined using the same name as an
> already existing table in the main database (which SQLITE3 apparently
> allows), PRAGMA table_info() returns the info for the temporary table,
> while the table info for the original table in the main database can't
> be retrieved until the temporary table is deleted.
>
> Not that i'd create such a table, but i'd like to write a small wrapper
> function for fetching the table info, where the caller shall choose if
> the info shall be taken from either the main or temp db, or any other
> attached database for that matter.
>
> Shouldn't be too problematic to add sucha feature?
>
> --
>
> Cheers,
>
> Oliver 'Bloody' Lange.
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
--
---------------------
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users