werner wrote:
> I am doing a bit of testing and run into this exception.
> line 614, in do_execute
>      cursor.execute(statement, parameters or [])
> sqlalchemy.exc.ProgrammingError: (ProgrammingError) (-104,
> 'isc_dsql_prepare: \n  Dynamic SQL Error\n  SQL error code = -104\n
> Token unknown - line 4, column 14\n  ,') '\nCREATE TABLE users (\n\tid
> INTEGER NOT NULL, \n\tname VARCHAR, \n\tfullname VARCHAR, \n\t"password"
> VARCHAR, \n\tPRIMARY KEY (id)\n)\n\n' ()
>
> Same code using 0.5.8 works fine.
>
> The model for users is:
>
> class User(Base):
>      """"""
>      __tablename__ = "users"
>
>      id = sa.Column(sa.Integer, sa.Sequence('users_id'), primary_key=True)
>      name = sa.Column(sa.String)
>      fullname = sa.Column(sa.String)
>      password = sa.Column(sa.String)
>
> It looks (using echo=True) like 0.5.8 used BLOB instead of VARCHAR for
> String without a size.

that sounds very strange.  0.4 and earlier would use TEXT for String with
no size.  In 0.5 we did away with that, as its a surprise - we had lot of
"string with no length" complaints, but I would prefer people learn about
String/String(50) instead of assuming that String always needs a length,
since that adds to the "verbose" narrative which really isn't true.  You
need the length only if you are issuing CREATE TABLE and you are on a
database that cares about the length.  Otherwise you do not need it (PG
and SQLite both allow VARCHAR with no length).   "String" is used in other
places besides table metadata, including func.foo(..., type_=String),
cast(x, String), etc.

I'm not aware off the top of my head which dialect could have been
emitting BLOB for VARCHAR, since those two types aren't even compatible.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to