--- Database.php 2012-08-24 18:49:53.431527570 -0500 +++ _backup_Database.php 2012-08-24 18:50:25.721527516 -0500 @@ -1378,6 +1378,17 @@ } $options = (array)$options; + + if ($this->getType() == 'postgres' and + (in_array('LOCK IN SHARE MODE', $options, true) or + isset($options['LOCK IN SHARE MODE']))) + { + // just fail... + //throw new Exception('Cannot use LOCK IN SHARE MODE with Postgresql'); + // or maybe just remove the option + unset($options['LOCK IN SHARE MODE']); + unset($options[array_search('LOCK IN SHARE MODE', $options, true)]); + } if ( is_array( $table ) ) { $useIndex = ( isset( $options['USE INDEX'] ) && is_array( $options['USE INDEX'] ) )