Hi,

Problem: My code generates a table or a view, based on user's preference. 
Table("something") accepts both table and view name and works properly for 
most of the tasks, including Table.exists(). When I use 
Table.delete()(postgresql) it works only on tables, when I try to use it on a 
view I get:

sqlalchemy.exc.ProgrammingError: (ProgrammingError) "contracts_denorm" is 
not a table
HINT:  Use DROP VIEW to remove a view.

This seems to be a little bit inconsistent or maybe I am missing something 
here and not doing it right. How to properly drop a view using SQLAlchemy? 
As for workaround, is there a way how I can at least determine whether the 
Table object is a view and issue manual DROP VIEW statement by myself?

Stefan Urbanek

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/0aZj0MOWgagJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to