Re: [sqlalchemy] postgresql tuple as function argument

2017-04-12 Thread mike bayer
On 04/12/2017 09:19 AM, Антонио Антуан wrote: your imports can't provide ARRAY class, I've added: from sqlalchemy.dialects.postgresql import ARRAY. My version is 1.0.14. for ARRAY + array_agg, explicit support for these things has improved in the 1.1 series, and if you're doing this kind of

Re: [sqlalchemy] [alembic] Batch migrations with sqlite and naming conventions

2017-04-12 Thread mike bayer
this area of batch migrations is not well developed, has to deal with some impossible situations due to SQLite's poor design (allowing unnamed constraints, not to mention that they refuse to implement ALTER), and is also in flux (as Alembic is relying upon a buggy behavior in SQLAlchemy

Re: [sqlalchemy] postgresql tuple as function argument

2017-04-12 Thread Антонио Антуан
Ok, I'l try it, thank you. вторник, 11 апреля 2017 г., 17:26:18 UTC+3 пользователь Mike Bayer написал: > > I will say that the psycopg2 driver is not supporting this, however, it > isn't parsing out the tuple. Using postgresql.ARRAY we get an answer > like: > > ['{', '"', '(', 'x', ',',

Re: [sqlalchemy] postgresql tuple as function argument

2017-04-12 Thread Антонио Антуан
your imports can't provide ARRAY class, I've added: from sqlalchemy.dialects.postgresql import ARRAY. My version is 1.0.14. Output: /home/anton/Projects/.venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value 'y'. (this

[sqlalchemy] Re: insertion into association table, giving integrityerror

2017-04-12 Thread shrey . chauhan
Sorry not the first one, but the second one -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.