escape bound param keys on postgresql

Issue #3246 resolved
Mike Bayer repo owner created an issue

see #3245

from sqlalchemy import create_engine, MetaData, Table, Column, Integer

engine = create_engine('postgresql://scott:tiger@localhost:5432/test', echo=True)
meta = MetaData(engine)
table = Table('test_parentheses', meta,
    Column('CT Volume (cc)', Integer) #, key='foob')
)
meta.create()

i = table.insert()
i.execute({'foob': 1})

print engine.execute(table.select().where(table.c.foob == 5))

Comments (2)

  1. Mike Bayer reporter
    • in lieu of adding a new system of translating bound parameter names for psycopg2 and others, encourage users to take advantage of positional styles by documenting "paramstyle". A section is added to psycopg2 specifically as this is a pretty common spot for named parameters that may be unusually named. fixes #3246.

    → <<cset 21022f9760e3>>

  2. Mike Bayer reporter
    • in lieu of adding a new system of translating bound parameter names for psycopg2 and others, encourage users to take advantage of positional styles by documenting "paramstyle". A section is added to psycopg2 specifically as this is a pretty common spot for named parameters that may be unusually named. fixes #3246.

    → <<cset d6da110c8135>>

  3. Log in to comment