# CLOB handling in ActiveRecord 1.14.2

**URL:** <https://www.ruby-forum.com/t/clob-handling-in-activerecord-1-14-2/57840>\
**Category:** Rails\
**Created:** [April 14, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/clob-handling-in-activerecord-1-14-2/57840 "2006-04-14T18:48:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjadrian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@rjadrian](https://www.ruby-forum.com/u/rjadrian)\
**Post date:** [April 14, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/clob-handling-in-activerecord-1-14-2/57840/1 "2006-04-14T18:48:00Z")

</div>

We recently switched to Rails 1.1.2, which includes the latest version  
of ActiveRecord.

This version seems to have introduced an error with the handling of  
non-binary large objects.

The OCI adapter in 1.13.2 seemed to have treated CLOB and BLOB  
identically. The new Oracle adapter distinguishes between the two types  
and gives CLOB a type of :text, where as BLOB are :binary

When it comes to insert or updating, only the binary fields are handled  
in the way that large objects should be handled (an after save  
callback).

It is trying to insert our CLOB as part of a large insert statement and  
Oracle is not happy.

We made a temporary base change to fix this, by making CLOBs :binary.

Has anyone else experienced this or know of an upcoming patch?

Much Thanks…

Richard

---

<div class="post-metadata">

**Author:** ![rjadrian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@rjadrian](https://www.ruby-forum.com/u/rjadrian)\
**Post date:** [April 15, 2006, 2:00am UTC](https://www.ruby-forum.com/t/clob-handling-in-activerecord-1-14-2/57840/2 "2006-04-15T02:00:24Z")

</div>

Richard Adrian wrote:

> The OCI adapter in 1.13.2 seemed to have treated CLOB and BLOB  
> identically. The new Oracle adapter distinguishes between the two types  
> and gives CLOB a type of :text, where as BLOB are :binary  
> …  
> Has anyone else experienced this or know of an upcoming patch?

I’ve posted a patch, waiting to be accepted:

```
http://dev.rubyonrails.org/ticket/4748
```
