Changeset 773
- Timestamp:
- 11/21/08 08:21:41 (7 weeks ago)
- Files:
-
- 1 modified
-
trunk/plugins/input/postgis/postgis.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/input/postgis/postgis.cpp
r769 r773 123 123 124 124 std::string table_name=table_from_sql(table_); 125 std::string schema_name=""; 126 std::string::size_type idx=table_name.find_last_of('.'); 127 if (idx!=std::string::npos) 128 { 129 schema_name=table_name.substr(0,idx); 130 table_name=table_name.substr(idx+1); 131 } 132 else 133 { 134 table_name=table_name.substr(0); 135 } 136 125 137 std::ostringstream s; 126 138 s << "select f_geometry_column,srid,type from "; 127 139 s << GEOMETRY_COLUMNS <<" where f_table_name='" << table_name<<"'"; 140 141 if (schema_name.length() > 0) 142 s <<" and f_table_schema='"<< schema_name <<"'"; 143 128 144 if (geometry_field_.length() > 0) 129 145 s << " and f_geometry_column = '" << geometry_field_ << "'";
