extract_tables fails to detect a handful of special names

159 views
Skip to first unread message

Amjith Ramanujam

unread,
Dec 20, 2014, 5:11:58 PM12/20/14
to sqlp...@googlegroups.com
I'm trying out the extract_table_names.py script from the example directory (https://github.com/andialbrecht/sqlparse/blob/master/examples/extract_table_names.py)

When I set the sql statment to 

SELECT * FROM table_name; 

I don't get anything back for the tables. 

But if I change it to 'SELECT * FROM table_name1', then I correctly get 'table_name1' as the output. In my limited testing I've found that it fails to detect 'table', 'table_name', 'column', 'column_name' as identifiers. 

I haven't been able to find the reason for it in the code. Do you have any suggestions or pointers on how to debug this? 

Thanks!
Amjith

Amjith Ramanujam

unread,
Dec 21, 2014, 2:22:53 PM12/21/14
to sqlp...@googlegroups.com
Never mind. I should have been grepping with case-insensitive. I see that 'table_name' is listed as a keyword. 

--
You received this message because you are subscribed to the Google Groups "sqlparse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlparse+u...@googlegroups.com.
To post to this group, send email to sqlp...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlparse.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages