[Easymod-cvs] sql_parser/root/includes/sql sql_builder_postgresql.php, 1.3, 1.4
Status: Beta
Brought to you by:
wgeric
|
From: Jim W. <ter...@us...> - 2008-02-16 22:18:36
|
Update of /cvsroot/easymod/sql_parser/root/includes/sql In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13207 Modified Files: sql_builder_postgresql.php Log Message: - fixed bug 1680118 - PostgreSQL errors Index: sql_builder_postgresql.php =================================================================== RCS file: /cvsroot/easymod/sql_parser/root/includes/sql/sql_builder_postgresql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sql_builder_postgresql.php 26 Sep 2005 09:59:13 -0000 1.3 --- sql_builder_postgresql.php 16 Feb 2008 22:18:28 -0000 1.4 *************** *** 227,231 **** $set_default = ( strstr('BIFD', $column_data['constant_type']) ? 0 : "''" ); } ! $sql_output[] = 'UPDATE TABLE ' . $sql_data['table_name'] . " SET $column_name = $set_default WHERE $column_name IS NULL"; $sql_output[] = 'ALTER TABLE ' . $sql_data['table_name'] . ' ALTER COLUMN ' . $column_name . $set_null; } --- 227,231 ---- $set_default = ( strstr('BIFD', $column_data['constant_type']) ? 0 : "''" ); } ! $sql_output[] = 'UPDATE ' . $sql_data['table_name'] . " SET $column_name = $set_default WHERE $column_name IS NULL"; $sql_output[] = 'ALTER TABLE ' . $sql_data['table_name'] . ' ALTER COLUMN ' . $column_name . $set_null; } *************** *** 274,278 **** if( $set_drop == 'SET' && isset($column_data['default']) ) { ! $sql_output[] = 'UPDATE TABLE ' . $sql_data['table_name'] . " SET $column_name = " . $column_data['default'] . " WHERE $column_name IS NULL"; } $sql_output[] = 'ALTER TABLE ' . $sql_data['table_name'] . ' ALTER COLUMN ' . $column_name . ' ' . $set_drop . ' NOT NULL'; --- 274,278 ---- if( $set_drop == 'SET' && isset($column_data['default']) ) { ! $sql_output[] = 'UPDATE ' . $sql_data['table_name'] . " SET $column_name = " . $column_data['default'] . " WHERE $column_name IS NULL"; } $sql_output[] = 'ALTER TABLE ' . $sql_data['table_name'] . ' ALTER COLUMN ' . $column_name . ' ' . $set_drop . ' NOT NULL'; |