Infinite loop calling in_() with PGArray column

Issue #2957 resolved
Former user created an issue

This enters an infinite loop calling in_():

from sqlalchemy import Column, Integer, Table, MetaData, literal
from sqlalchemy.dialects.postgresql.base import PGArray

tbl = Table('foo', MetaData(), Column('bar', PGArray(Integer)))
literal('3').in_(tbl.c.bar)

An array as the right side of an IN operator isn't valid in PostgreSQL of course, but an infinite loop is still a bit too drastic.

Happens in 0.8.4 as well as on the bleeding edge.

Comments (5)

  1. Mike Bayer repo owner

    agh this is that __getitem__() thing again! where we used to raise an exception on __iter__() to prevent this, but then someone complained about that, now what was the problem with that....

  2. Log in to comment