Skip to content

Commit

Permalink
Forcing table names to lower case when initially added.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/postgis/trunk@6001 b70326c6-7e19-0410-871a-916f4a2858ee
  • Loading branch information
Mark Leslie committed Sep 22, 2010
1 parent de225be commit aa50208
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions loader/shp2pgsql-gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ pgui_action_shape_file_set(const char *gtk_filename)
FILENODE *file;
char *shp_file;
int shp_file_len;
int i;
char *table_start;
char *table_end;
char *table;
Expand Down Expand Up @@ -1666,9 +1667,19 @@ pgui_action_shape_file_set(const char *gtk_filename)
memcpy(table, table_start, table_end - table_start);
table[table_end - table_start] = '\0';

/* Force the table name to lower case */
for(i = 0; i < table_end - table_start; i++)
{
if(isupper(table[i]) != 0)
{
table[i] = tolower(table[i]);
}
}

/* Set the table name into the configuration */
config->table = table;


/*
gtk_entry_set_text(GTK_ENTRY(entry_config_table), table);
*/
Expand Down

0 comments on commit aa50208

Please sign in to comment.