<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<h2 dir="auto">Test Case</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import create_engine
from sqlalchemy import Table
from sqlalchemy import MetaData

import os
os.environ['INFORMIXSERVER']('INFORMIXSERVER') = 'myserver'

engine = create_engine(&quot;informix://user:pass@libname/db&quot;)
metadata = MetaData(bind=engine)

table = Table( 'mytable', metadata, autoload=True)"><pre class="notranslate"><code class="notranslate">from sqlalchemy import create_engine
from sqlalchemy import Table
from sqlalchemy import MetaData

import os
os.environ['INFORMIXSERVER']('INFORMIXSERVER') = 'myserver'

engine = create_engine("informix://user:pass@libname/db")
metadata = MetaData(bind=engine)

table = Table( 'mytable', metadata, autoload=True)
</code></pre></div>
<p dir="auto">results in the following stack trace.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python sqlalchemyinformixtestcase.py 
Traceback (most recent call last):
  File &quot;sqlalchemyinformixtestcase.py&quot;, line 11, in &lt;module&gt;
    table = Table( 'mytable', metadata, autoload=True)
  File &quot;/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/schema.py&quot;, line 113, in __call__
    return type.__call__(self, name, metadata, *args, **kwargs)
  File &quot;/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/schema.py&quot;, line 241, in __init__
    _bind_or_error(metadata).reflecttable(self, include_columns=include_columns)
  File &quot;/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/engine/base.py&quot;, line 1265, in reflecttable
    self.dialect.reflecttable(conn, table, include_columns)
  File &quot;/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/databases/informix.py&quot;, line 256, in reflecttable
    if table.owner is not None:
AttributeError: 'Table' object has no attribute 'owner'"><pre class="notranslate"><code class="notranslate">python sqlalchemyinformixtestcase.py 
Traceback (most recent call last):
  File "sqlalchemyinformixtestcase.py", line 11, in &lt;module&gt;
    table = Table( 'mytable', metadata, autoload=True)
  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/schema.py", line 113, in __call__
    return type.__call__(self, name, metadata, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/schema.py", line 241, in __init__
    _bind_or_error(metadata).reflecttable(self, include_columns=include_columns)
  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/engine/base.py", line 1265, in reflecttable
    self.dialect.reflecttable(conn, table, include_columns)
  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/databases/informix.py", line 256, in reflecttable
    if table.owner is not None:
AttributeError: 'Table' object has no attribute 'owner'
</code></pre></div>
<p dir="auto">I have a patch that I will post up after I make sure it all works.</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1297/informix.py">informix.py</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">should apply quoting rules inside of has_table(), reflecttable(), etc.</p>