[sqlalchemy] Re: same code same database but the not same insert result

2014-07-10 Thread Jonathan Vanasco
On Wednesday, July 9, 2014 9:56:14 PM UTC-4, Frank Liou wrote: why get not the same result? There is no reason why the example you gave would insert that value. You need to make a standalone script that shows this error happening in SqlAlchemy. If you can't reproduce the error, then

[sqlalchemy] Bound parameter on Postgres/psycopg2 Range data types

2014-07-10 Thread Brian Findlay
With the following model, I can currently set postgres range data types in 2 ways: *Model:* from sqlalchemy.dialects.postgresql import INT4RANGE class Foo(Base): __tablename__ = 'foo' id = Column(Integer, primary_key=True) bar = Column(INT4RANGE) *Method #1 - as string data type:*

[sqlalchemy] Re: Bound parameter on Postgres/psycopg2 Range data types

2014-07-10 Thread Brian Findlay
Sqlalchemy seems to be coercing the upper boundary to be exclusive. See below tests (will need to change postgres db if you want to run them). from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects.postgresql

Re: [sqlalchemy] problems with mysql reflect

2014-07-10 Thread Paul Molodowitch
Whoops! Just noticed this was the totally wrong traceback! Here's the correct trace: Traceback (most recent call last): File stdin, line 1, in module File test.py, line 155, in module metadata.reflect(db.engine, only=tables) File ./sqlalchemy/sql/schema.py, line 3277, in reflect

Re: [sqlalchemy] Re: Bound parameter on Postgres/psycopg2 Range data types

2014-07-10 Thread Mike Bayer
On 7/10/14, 2:46 PM, Brian Findlay wrote: Sqlalchemy seems to be coercing the upper boundary to be exclusive. See below tests (will need to change postgres db if you want to run them). from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import

Re: [sqlalchemy] problems with mysql reflect

2014-07-10 Thread Mike Bayer
On 7/10/14, 3:49 PM, Paul Molodowitch wrote: Whoops! Just noticed this was the totally wrong traceback! Here's the correct trace: Traceback (most recent call last): File stdin, line 1, in module File test.py, line 155, in module metadata.reflect(db.engine,

Re: [sqlalchemy] Re: Bound parameter on Postgres/psycopg2 Range data types

2014-07-10 Thread Brian Findlay
Actually, looks like the problem is with psycopg2's handling of range types, specifically with integers. Test attached. Will forward to psycopg2 maintainers. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop