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
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 "", line 1, in
> File "test.py", line 155, in
> metadata.reflect(db.engine, only=tables)
>
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 decl
Whoops! Just noticed this was the totally wrong traceback!
Here's the correct trace:
Traceback (most recent call last):
File "", line 1, in
File "test.py", line 155, in
metadata.reflect(db.engine, only=tables)
File "./sqlalchemy/sql/schema.py", line 3277, in reflect
Table(name, se
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 import
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:*
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, the