glom r1474 - in trunk: . glom glom/navigation
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1474 - in trunk: . glom glom/navigation
- Date: Thu, 27 Mar 2008 10:41:35 +0000 (GMT)
Author: murrayc
Date: Thu Mar 27 10:41:34 2008
New Revision: 1474
URL: http://svn.gnome.org/viewvc/glom?rev=1474&view=rev
Log:
2008-03-27 Murray Cumming <murrayc murrayc com>
* glom/navigation/box_tables.cc: on_adddel_Delete(): Put quotes around
the table name when doing a DROP TABLE, so we can delete tables that
use upper case in their name.
Bug #522233 (Pavel MlÄoch).
Modified:
trunk/ChangeLog
trunk/glom/base_db.cc
trunk/glom/glom_postgres.cc
trunk/glom/navigation/box_tables.cc
Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc (original)
+++ trunk/glom/base_db.cc Thu Mar 27 10:41:34 2008
@@ -1102,7 +1102,7 @@
//query_execute( "INSERT INTO \"" + table_name + "\" VALUES (0)" );
//PostgresSQL:
- //query_execute( "CREATE TABLE " + table_name + " (\"" + primary_key_name + "\" serial NOT NULL PRIMARY KEY)" );
+ //query_execute( "CREATE TABLE \"" + table_name + "\" (\"" + primary_key_name + "\" serial NOT NULL PRIMARY KEY)" );
//query_execute( "CREATE TABLE \"" + table_name + "\" (" +
// field_primary_key->get_name() + " numeric NOT NULL PRIMARY KEY," +
Modified: trunk/glom/glom_postgres.cc
==============================================================================
--- trunk/glom/glom_postgres.cc (original)
+++ trunk/glom/glom_postgres.cc Thu Mar 27 10:41:34 2008
@@ -177,7 +177,7 @@
if( set_anyway || (field->get_field_info().get_allow_null() != field_old->get_field_info().get_allow_null()) )
{
Glib::ustring nullness = (field->get_field_info().get_allow_null() ? "NULL" : "NOT NULL");
- query_execute( "ALTER TABLE " + m_table_name + " ALTER COLUMN " + field->get_name() + " SET " + nullness);
+ query_execute( "ALTER TABLE \"" + m_table_name + "\" ALTER COLUMN \"" + field->get_name() + "\" SET " + nullness);
}
*/
Modified: trunk/glom/navigation/box_tables.cc
==============================================================================
--- trunk/glom/navigation/box_tables.cc (original)
+++ trunk/glom/navigation/box_tables.cc Thu Mar 27 10:41:34 2008
@@ -300,7 +300,7 @@
//Delete the table:
if(iButtonClicked == Gtk::RESPONSE_OK)
{
- query_execute( "DROP TABLE " + table_name, get_app_window());
+ query_execute( "DROP TABLE \"" + table_name + "\"", get_app_window());
get_document()->remove_table(table_name); //Forget about it in the document too.
something_changed = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]