On Oct 26, 2009, at 5:28 PM, Rob Sciuk wrote:

>
> I've just compiled the latest (3.6.19) with the
>
> -DSQLITE_ENABLE_COLUMN_METADATA flag set.  The problem I'm seeing is  
> that
> when I use an aggregate function in a select, the table name is not  
> being
> returned from an sqlite3_column_table_name() is not returning the
> tablename as expected from a prepared statement, whereas if I actually
> request data from the table, it works fine:
>
> eg:
> If I prepare the statement "select * from q_user", q_user is  
> returned as
> expected from sqlite3_column_table_name().
>
> If I prepare the statement "select count(*) from q_user",
> sqlite3_column_table_name() returns NULL.

sqlite3_column_table_name() (and all of the other METADATA functions)  
only work on table columns, not on functions.  The documentation says  
as much, though perhaps it could be worded more directly.  I'll make a  
note to clarify the documentation.

>
> This is somewhat disconcerting, and seems repeatable.  Are aggregate
> functions handled differently than tuple data?
>
> Are there any other dependancies other than  
> SQLITE_ENABLE_COLUMN_METADATA?
>
> Is there anything I might have overlooked??
>
> Any ideas??
>
> Thanks in advance,
> Rob Sciuk
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to