Not really sure, that URL itself won't allow a psycopg2 connection to even occur. The error means that the construct is trying to be generated as a string, like in a print statement. But 1.1 has a new feature that allows default stringification of pg.ARRAY and other constructs to actually work.

Need a stack trace at the very least.



On 06/27/2016 08:34 AM, Martijn van Oosterhout wrote:
from sqlalchemy import create_engine, MetaData
from sqlalchemy import Column
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy import String
from sqlalchemy.ext.declarative import declarative_base

metadata = MetaData()
metadata.bind = create_engine('postgresql:///')
Base = declarative_base(metadata=metadata)

class Test(Base):
    __tablename__ = 'test'
    reference = Column(ARRAY(String), nullable=False,
server_default='{}', primary_key=True)

metadata.create_all(bind=metadata.bind)

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to