[sqlalchemy] Re: use_labels =30 vs MAX_LABEL_LENGTH

2007-03-17 Thread jose
Michael Bayer wrote: ideally the truncation should be occuring at the SQL compilation phase so you wouldnt have this problem. i recall that being very complex but i should take a look again to see if theres any major barriers to that. but for now, sure, ive no problem with a module-level

[sqlalchemy] Re: use_labels =30 vs MAX_LABEL_LENGTH

2007-03-17 Thread Jorge Godoy
jose [EMAIL PROTECTED] writes: * PostgreSQL = 64 - 1 This can be changed in compilation time. -- Jorge Godoy [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to

[sqlalchemy] Re: use_labels =30 vs MAX_LABEL_LENGTH

2007-03-17 Thread Michael Bayer
On Mar 17, 3:57 am, jose [EMAIL PROTECTED] wrote: May be you may assign the MAXLENGTH depending on the database, for example: * MySQL = 64 * PostgreSQL = 64 - 1 * Firebird = 31 ? * Oracle = 30 * MS-SQL = 128 well yes thats the whole issue. we are doing the length truncation at the point

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-17 Thread Simon King
On Mar 16, 9:50 pm, Michael Bayer [EMAIL PROTECTED] wrote: oh, this is easy. you have a circular insert relationship between label and release_line, which you can see in the sort there (the cycles:) as well as evidenced by the fact that you have a use_alter needed in order to create the

[sqlalchemy] Bug?

2007-03-17 Thread olivier . bayart
Hi, I'm having a problem where the result of 2 programs with the same code is different. Program A : from sqlalchemy import * db = create_engine('sqlite:///test18.db') db.echo = False metadata = BoundMetaData(db) users = Table('users', metadata, Column('user_id',

[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-17 Thread skip . montanaro
Michael go into python and type: Michael from pysqlite2 import dbapi2 Michael dbapi2.sqlite_version Well, that failed: $ /tmp/python-buildbot/local/bin/python Python 2.6a0 (trunk:54421, Mar 17 2007, 11:17:17) [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin

[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-17 Thread Michael Bayer
yes 3.1.3 is a fairly old version (from February 2005), the unit tests are assuming at least version 3.2.3 of sqlite. but youre best off with the very latest 3.3.13. On Mar 17, 2007, at 4:25 PM, [EMAIL PROTECTED] wrote: Michael go into python and type: Michael from pysqlite2

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
the cursor metadata often cannot be read until fetchone() is called first. the current result set implementation we have doesnt call fetchone() before it tries to get the metadata, and normally it shouldnt (since the result set doesnt even know if its the result of a select/insert/whatever).

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Steve Huffman
I may be missing something fundamental here, but why doesn't it already know the metadata since I defined the columns in which I'm interested? thing_table = sa.Table(thing, md, sa.Column('id', sa.Integer, primary_key = True)) On 3/17/07, Michael Bayer [EMAIL PROTECTED] wrote: the cursor

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
no its a psycopg thing, its like this: # server side cursor (giving it a name makes it server side. psycopg2 devs think thats a good API.) cursor = connection.cursor(x) # execute. cursor now has pending results. cursor.execute(select * from table) SQLAlchemy's result wrapper, ResultProxy,

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
sorry, i meant cursor.description, not cursor.metadata. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Steve Huffman
SQLAlchemy's result wrapper, ResultProxy, then calls: metadata = cursor.metadata My question was why doesn't ResultProxy use the sqlalchemy metadata I defined when I defined the sqlalchemy Table? to psycopg2 versions, PG setup, or what. if we can determine its a psycopg2 version issue,