Index: field.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.api.php,v
retrieving revision 1.2
diff -u -r1.2 field.api.php
--- field.api.php	10 Feb 2009 03:16:14 -0000	1.2
+++ field.api.php	8 Mar 2009 01:05:14 -0000
@@ -556,11 +556,11 @@
  *   The entity type of object, such as 'node' or 'user'.
  * @param $object
  *   The object on which to operate.
- * @param $update
- *   TRUE if this is an update to an existing object, FALSE if it is
- *   an insert of a new object.
+ * @param $op
+ *   FIELD_STORAGE_UPDATE when updating an existing object,
+ *   FIELD_STORAGE_INSERT when inserting a new object.
  */
-function hook_field_storage_write($obj_type, $object, $update = TRUE) {
+function hook_field_storage_write($obj_type, $object, $op) {
 }
 
 /**
Index: field.attach.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v
retrieving revision 1.3
diff -u -r1.3 field.attach.inc
--- field.attach.inc	10 Feb 2009 03:16:14 -0000	1.3
+++ field.attach.inc	8 Mar 2009 01:05:08 -0000
@@ -29,6 +29,20 @@
  * The Drupal system variable field_storage_module identifies the
  * field storage module to use.
  */
+
+/**
+ * Argument for an insert operation.
+ * This is used in hook_field_storage_write when updating an 
+ * existing object.
+ */
+define('FIELD_STORAGE_UPDATE', 'update');
+
+/**
+ * Argument for an update operation.
+ * This is used in hook_field_storage_write when inserting a new object.
+ */
+define('FIELD_STORAGE_INSERT', 'insert');
+
 /**
  * @} End of "defgroup field_storage"
  */
@@ -386,7 +400,7 @@
   }
 
   _field_invoke('insert', $obj_type, $object);
-  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object);
+  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, FIELD_STORAGE_INSERT);
 
   list($id, $vid, $bundle, $cacheable) = field_attach_extract_ids($obj_type, $object);
   if ($cacheable) {
@@ -411,7 +425,7 @@
   }
 
   _field_invoke('update', $obj_type, $object);
-  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, TRUE);
+  module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_write', $obj_type, $object, FIELD_STORAGE_UPDATE);
 
   list($id, $vid, $bundle, $cacheable) = field_attach_extract_ids($obj_type, $object);
   if ($cacheable) {
Index: modules/field_sql_storage/field_sql_storage.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module,v
retrieving revision 1.4
diff -u -r1.4 field_sql_storage.module
--- modules/field_sql_storage/field_sql_storage.module	10 Feb 2009 03:16:14 -0000	1.4
+++ modules/field_sql_storage/field_sql_storage.module	8 Mar 2009 01:02:28 -0000
@@ -229,7 +229,7 @@
   return $additions;
 }
 
-function field_sql_storage_field_storage_write($obj_type, $object, $update = FALSE) {
+function field_sql_storage_field_storage_write($obj_type, $object, $op) {
   list($id, $vid, $bundle) = field_attach_extract_ids($obj_type, $object);
   $etid = _field_sql_storage_etid($obj_type);
 
@@ -247,7 +247,7 @@
     // where it's an empty array with the faster isset().
     if (isset($object->$field_name) || property_exists($object, $field_name)) {
       // Delete and insert, rather than update, in case a value was added.
-      if ($update) {
+      if ($op == FIELD_STORAGE_UPDATE) {
         db_delete($table_name)->condition('etid', $etid)->condition('entity_id', $id)->execute();
         if (isset($vid)) {
           db_delete($revision_name)->condition('etid', $etid)->condition('entity_id', $id)->condition('revision_id', $vid)->execute();

