Changeset 773

Show
Ignore:
Timestamp:
11/21/08 08:21:41 (7 weeks ago)
Author:
artem
Message:

+ applied postgis_schema patch from dodobas

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/input/postgis/postgis.cpp

    r769 r773  
    123123          
    124124         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 
    125137         std::ostringstream s; 
    126138         s << "select f_geometry_column,srid,type from "; 
    127139         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 
    128144         if (geometry_field_.length() > 0) 
    129145            s << " and f_geometry_column = '" << geometry_field_ << "'";