提交 216b2429 编写于 作者: N Nikita Akilov

#9447 add srid to geom type in pg

上级 7903bdde
......@@ -124,7 +124,12 @@ public class PostgreGeometryValueHandler extends JDBCAbstractValueHandler {
@Override
public String getValueDisplayString(@NotNull DBSTypedObject column, Object value, @NotNull DBDDisplayFormat format) {
if (value instanceof DBGeometry && format == DBDDisplayFormat.NATIVE) {
return "'" + value.toString() + "'";
final int valueSRID = ((DBGeometry) value).getSRID();
String strValue = value.toString();
if (valueSRID != 0 && !strValue.startsWith("SRID=")) {
strValue = "'SRID=" + valueSRID + ";" + strValue + "'::geometry";
}
return strValue;
}
return super.getValueDisplayString(column, value, format);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册