[cx-oracle-users] Re: set{input,output}sizes() (changed subject)
Brought to you by:
atuining
From: Jani T. <re...@lu...> - 2005-05-17 20:35:57
|
Anthony Tuininga kirjoitti: > On 5/17/05, Guido van Rossum <gu...@el...> wrote: > >>example, when inserting a 100K-long string into a table column whose >>type is CLOB, why would I have to say that it's a CLOB again? > > > Any string longer than 4000 characters cannot be represented as > varchar2 but there are several options: long, long raw, CLOB, BLOB so > which one gets chosen? At the moment cx_Oracle does not guess at all > and simply allows the error to be propagated. Again, suggestions are > welcome! Actually I found out that it really tries > 4k chars to insert as LONG . Why , I've no idea (happens at least with cx_Oracle 4.1). Well problem is that LONG is deprecated type, and you can have only one LONG column in table. So I think if string is > 4k it would be safe to assume it as CLOB. Of course this could be connection wide setting (outside DB API) to set default type for guess.. -- Jani Tiainen |