Maggie Nelson

databases and code goodness

  • Author: maggie
  • Published: Jun 20th, 2007
  • Category: entry
  • Comments: 1

PDO_OCI does not support CLOBs

TAGS: None

LOB support was added to PDO_OCI in PHP 5.1. This is really cool, however, it appears that the LOB support really means BLOB support. I’m trying to use PDO::PARAM_LOB constant to pass in CLOBs (not BLOBs) and I get the following Oracle error:

ORA-00932: inconsistent datatypes: expected BLOB got CLOB

After much investigation and self-doubt (e.g. “what if we’re using streams incorrectly?”), we found out that PDO_OCI does not currently support CLOBs (BLOBs only!).
Here’s some documentation on this bug: Cannot insert CLOB into table.
Chris Jones just let us know that a fix to this bug and a related Seg fault after NLS environment initialization error will be merged into the next PDO_OCI patch shortly.
(Comments are open if you have any updates about this bug.)

TAGS: None

One Response to “PDO_OCI does not support CLOBs”


  1. Christopher Jones
    on Jun 21st, 2007
    @ 11:39 am

    Any feedback on the patch in the bug would be appreciated.

© 2010 Maggie Nelson. All Rights Reserved.

This blog is powered by the Wordpress platform and beach rentals.