Simon,
If you develop bussiness software, where you know exactly the querys because 
you are writing them, then there is no problem at all. But other kind of 
software, like a database manager, need all available metadata. And more 
metadata info is better, for sure. And this is my case now.
Yep.  That's what

<http://www.sqlite.org/pragma.html#pragma_table_info>

is for.

No, sorry. It's not. That pragma shows information about a given table, and that it's ok. But it's not what I'm talking about. Please, reread my first post. A simple sentence like:

SELECT * FROM mytable AS myalias

causes that sqlite3_column_table_name() returns "mytable" for every column. And what I'm asking for is a function that returns "myalias" in that case. No less no more. In my previous message I attached a patch that adds the function sqlite3_column_table_alias_name(), which does the job.

IMHO, sqlite3_column_table_name() should returns the table alias, and there should be another function sqlite3_columns_orgtable_name() which returns the original table name. But now, it's not desirable to break backwards compatibility.

Regards,
Jose F. Gimenez
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to