On Sep 17, 2008, at 3:18 PM, Kevin Dangoor wrote:

>
> Hi Mike,
>
> On Sep 17, 1:53 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
>> We've strictified the difference between String() and Text() in 0.5
>> such that String() doesn't implicitly go from VARCHAR to TEXT without
>> a length.   So in your case you want to use UnicodeText.
>
> OK, I guess that's reasonable. But, at the same time, I would call the
> current behavior a bug, because it generates SQL that is rejected by
> the DBMS. It should either raise an exception saying "You dork! you
> need to either provide a length or use a text column" or just spit out
> a TEXT column, possibly with a warning.
>
> Thanks for the quick response!

some databases do accept VARCHAR without a length.  Also, its a valid  
use case to use String/VARCHAR by itself without a length if you're  
using it in a CAST expression, as well as all the scenarios where you  
are using it just for its type alone and not to generate the DDL  
identifier.     So in this case the DBMS's exception is the best  
exception to be raised (we usually try not to superimpose our own  
exceptions on top of what the database reports just fine).


--~--~---------~--~----~------------~-------~--~----~
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