Revision 53 trunk/org.gvsig.postgresql/org.gvsig.postgresql.provider/src/main/java/org/gvsig/fmap/dal/store/postgresql/PostgreSQLHelper.java
PostgreSQLHelper.java | ||
---|---|---|
938 | 938 |
} |
939 | 939 |
} |
940 | 940 |
|
941 |
|
|
941 | 942 |
private int[] getPostgisVersion() { |
942 |
|
|
943 |
|
|
943 | 944 |
String sql = "SELECT PostGIS_Lib_Version()"; |
944 | 945 |
ResultSet rs = null; |
945 | 946 |
Statement st = null; |
946 | 947 |
String v = null; |
947 |
|
|
948 |
Connection conn = null; |
|
948 | 949 |
try { |
949 |
st = this.getConnection().createStatement(); |
|
950 |
conn = this.getConnection(); |
|
951 |
st = conn.createStatement(); |
|
950 | 952 |
rs = st.executeQuery(sql); |
951 | 953 |
rs.next(); |
952 | 954 |
v = rs.getString(1); |
... | ... | |
959 | 961 |
} finally { |
960 | 962 |
try { rs.close(); } catch (Exception e) {}; |
961 | 963 |
try { st.close(); } catch (Exception e) {}; |
964 |
try { conn.close(); } catch (Exception e) {}; |
|
962 | 965 |
} |
963 |
|
|
966 |
|
|
964 | 967 |
String[] vv = v.split("\\."); |
965 | 968 |
int[] resp = new int[3]; |
966 | 969 |
try { |
... | ... | |
975 | 978 |
} |
976 | 979 |
|
977 | 980 |
|
981 |
|
|
978 | 982 |
protected Properties getBeforePostgis13Properties() { |
979 | 983 |
if (beforePostgis13 == null) { |
980 | 984 |
|
Also available in: Unified diff