Re: [Sqlalchemy-tickets] [sqlalchemy] #2843: Support for IF EXISTS/IF NOT EXISTS DDL constructs
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-10-17 19:46:57
|
#2843: Support for IF EXISTS/IF NOT EXISTS DDL constructs
------------------------------+-------------------------------
Reporter: remyroy | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.xx
Component: schema | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
well the downside is that different database backends would now take an
entirely different approach for create/drop, which would remove a certain
consistency of approach we've had for many years in this area, as well as
place a new and unproven feature at the center of a very stable and
critical function. if performance is a concern (which it's generally
not) I was thinking we could instead amend dialects to include a new
"has_tables" function, that could query the existence of many tables all
at once, providing a performance improvement that applies to any backend
(at least as long as they support querying for multiple table names at
once via system views). the case where most tables exist already would
otherwise mean there'd be a lot of fully rendered CREATE TABLE statements
being parsed for no reason.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2843#comment:4>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|