[sqlalchemy] building a sqlalchemy postgresql cidr contains query

2014-09-08 Thread Raymond Burkholder
I have a model defined with: from app import db from sqlalchemy.dialects import postgresql class TableIpAddress(db.Model): __tablename__ = 'ipaddress' idipaddress = db.Column( postgresql.UUID, primary_key=True ) ipaddress = db.Column( postgresql.CIDR, index=True, nullable=False ) I would

Re: [sqlalchemy] building a sqlalchemy postgresql cidr contains query

2014-09-08 Thread Michael Bayer
in your stack trace is this weird string postgresql.driver.pq3, googling it reveals this is the py-postgresql driver. This is not at all a well-known driver and I suggest switching to psycopg2, which will probably just work in this case. On Sep 8, 2014, at 4:23 PM, Raymond Burkholder

RE: [sqlalchemy] building a sqlalchemy postgresql cidr contains query

2014-09-08 Thread Raymond Burkholder
in your stack trace is this weird string postgresql.driver.pq3, googling it reveals this is the py-postgresql driver. This is not at all a well-known driver and I suggest switching to psycopg2, which will probably just work in this case. Does psycopg2 parameterize it's queries, and

Re: [sqlalchemy] building a sqlalchemy postgresql cidr contains query

2014-09-08 Thread Michael Bayer
psycopg2 doesn't standardize on prepared statements so i think it does string parameterization.I don't believe postgresql offers much advantage to native parameters. On Sep 8, 2014, at 5:24 PM, Raymond Burkholder r...@oneunified.net wrote: in your stack trace is this weird string