On Nov 29, 2007, at 7:21 PM, Jason R. Coombs wrote:

>
> Hello.  I've run into a problem with sqlalchemy 0.3.12dev (svn trunk)
> on Oracle 9i where I get an exception "identifier too long".  This is
> on table creation where the the column is Column( 'signer_accountid',
> index=True ) and the tablename is 'signed_documents'.  The index
> generated is 'ix_signed_documents_signer_accountid' which is longer
> than the allowed 30 chars.
>
> I see the 'identifier too long' issue was resolved for temporary
> identifiers (column labels) in an earlier build of sqlalchemy (0.1.3):
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00789.html
>
> Has this index identifier issue been addressed in the trunk (0.4.x)?
> If not, I'm happy to post a ticket and provide a test case.
>

the issue is limited to indexes on Oracle, and this is ticket #820.   
im looking at the patch someone posted for 0.4 and it doesnt really  
make any sense to me, and the 0.3 patch is in theory not "safe" since  
it could generate two identical names.  in this case id prefer to  
patch Index itself to generate very short names using a deterministic  
hashing algorithm of some kind.

theres an easy breezy workaround for this which is just to use the  
Index construct explicitly:

t = Table('foo', meta,
        Column('id', ...)...
)
Index('my_index_name', t.c.id, t.c.foo)

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to