Revision 11959 branches/v10/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/PostGisDriver.java
PostGisDriver.java | ||
---|---|---|
616 | 616 |
|
617 | 617 |
// String sql = "SELECT * FROM GEOMETRY_COLUMNS WHERE F_TABLE_NAME = '" |
618 | 618 |
// + getTableName() + "' AND F_GEOMETRY_COLUMN = '" + getLyrDef().getFieldGeometry() + "'"; |
619 |
String sql = "SELECT * FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = '"+ getLyrDef().getSchema() + "' AND F_TABLE_NAME = '" |
|
620 |
+ getLyrDef().getTableName() + "' AND F_GEOMETRY_COLUMN = '" + getLyrDef().getFieldGeometry() + "'"; |
|
619 |
String sql; |
|
620 |
if (getLyrDef().getSchema() == null || getLyrDef().getSchema().equals("")){ |
|
621 |
sql = "SELECT * FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = '" |
|
622 |
+ getLyrDef().getTableName() + "' AND F_GEOMETRY_COLUMN = '" + getLyrDef().getFieldGeometry() + "'"; |
|
623 |
}else{ |
|
624 |
sql = "SELECT * FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = '"+ getLyrDef().getSchema() + "' AND F_TABLE_NAME = '" |
|
625 |
+ getLyrDef().getTableName() + "' AND F_GEOMETRY_COLUMN = '" + getLyrDef().getFieldGeometry() + "'"; |
|
626 |
} |
|
621 | 627 |
|
622 | 628 |
ResultSet rs = stAux.executeQuery(sql); |
623 | 629 |
rs.next(); |
Also available in: Unified diff