Re: 2 patches: TEXT type & type checking off
Carlos Konstanski <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 7 Sep 2009, Vsevolod wrote: > Date: Mon, 7 Sep 2009 12:03:52 +0200 > From: Vsevolod <[email protected]> > To: Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> > Cc: clsql <[email protected]> > Subject: Re: [CLSQL] 2 patches: TEXT type & type checking off > > I've made a little inquiry: at least Oracle doesn't support such data type. > > On Fri, Sep 4, 2009 at 9:01 PM, Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> wrote: > >> Here are 2 patches to clsql-4.0.3: >>> * patch-text.diff -- adding a TEXT database type >>> >> >> I reviewed this patch. It seems fine, but I'm not certain that all >> supported backends >> support a TEXT field type. If they do not, then the patch leads to the >> issue of >> people using CLSQL to be lulled into using non-portable types. >> >> Do you know if TEXT is a valid field type for all supported backends? >> >> Thanks, >> >> Kevin > -- > vsevolod Oracle has CLOB and NCLOB, which are the equivalent of TEXT. It doesn't get a lot of use because a VARCHAR2 can be 4000 bytes in length, which is long enough for 99% of everyday usage. A CLOB or NCLOB can be (4 gigabytes - 1) * (database block size) in length. These data types have ODBC mappings as well. The following comes directly from Oracle's documentation: Oracle's limit for SQL_LONGVARCHAR data where the column type is LONG is 2,147,483,647 bytes. Oracle's limit for the SQL_LONGVARCHAR data where the column type is CLOB is 4 gigabytes. The limiting factor is the client workstation memory. Oracle database allows only a single long data column per table. The long data types are SQL_LONGVARCHAR (LONG) and SQL_LONGVARBINARY (LONG RAW). Oracle recommends you use CLOB and BLOB columns instead. There is no restriction on the number of CLOB and BLOB columns in a table. Carlos