glom r1473 - in branches/glom-1-6: . glom glom/navigation
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1473 - in branches/glom-1-6: . glom glom/navigation
- Date: Thu, 27 Mar 2008 10:40:24 +0000 (GMT)
Author: murrayc
Date: Thu Mar 27 10:40:24 2008
New Revision: 1473
URL: http://svn.gnome.org/viewvc/glom?rev=1473&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:
branches/glom-1-6/ChangeLog
branches/glom-1-6/glom/base_db.cc
branches/glom-1-6/glom/glom_postgres.cc
branches/glom-1-6/glom/navigation/box_tables.cc
Modified: branches/glom-1-6/glom/base_db.cc
==============================================================================
--- branches/glom-1-6/glom/base_db.cc (original)
+++ branches/glom-1-6/glom/base_db.cc Thu Mar 27 10:40:24 2008
@@ -1078,7 +1078,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: branches/glom-1-6/glom/glom_postgres.cc
==============================================================================
--- branches/glom-1-6/glom/glom_postgres.cc (original)
+++ branches/glom-1-6/glom/glom_postgres.cc Thu Mar 27 10:40:24 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: branches/glom-1-6/glom/navigation/box_tables.cc
==============================================================================
--- branches/glom-1-6/glom/navigation/box_tables.cc (original)
+++ branches/glom-1-6/glom/navigation/box_tables.cc Thu Mar 27 10:40:24 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]