View Issue Details

IDProjectCategoryView StatusLast Update
0000166SymmetricDSNew Featurepublic2014-06-17 00:27
ReporterAssigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.6.0 
Target Version3.6.0Fixed in Version3.6.0 
Summary0000166: Integrate changes to support spatial data replication using http://postgis.refractions.net/
DescriptionIntegrate changes to support spatial data replication using http://postgis.refractions.net/
TagsNo tags attached.

Activities

cronjefourie

2014-03-27 14:29

reporter   ~0000500

I've created a fix for geometry data replication. This does data replication but not schema replication. I'll add as issue-166.patch

cronjefourie

2014-03-27 14:29

reporter  

issue-166.patch (2,360 bytes)   
Index: symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDmlStatement.java
===================================================================
--- symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDmlStatement.java	(revision 8112)
+++ symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDmlStatement.java	(working copy)
@@ -123,6 +123,8 @@
                     sql.append("cast(? as bit varying)").append(",");
                 } else if (columns[i].getJdbcTypeName() != null && columns[i].getJdbcTypeName().toUpperCase().contains(TypeMap.INTERVAL)) {
                     sql.append("cast(? as interval)").append(",");
+                } else if (columns[i].getJdbcTypeName() != null && columns[i].getJdbcTypeName().toUpperCase().contains(TypeMap.GEOMETRY)) {
+                    sql.append("ST_GEOMFROMTEXT(?)").append(",");
                 } else {
                     sql.append("?").append(",");
                 }
@@ -153,6 +155,9 @@
                 } else if (columns[i].getJdbcTypeName().toUpperCase().contains(TypeMap.INTERVAL)) {
                     sql.append(quote).append(columns[i].getName()).append(quote)
                           .append(" = cast(? as interval)").append(separator);
+                } else if (columns[i].getJdbcTypeName().toUpperCase().contains(TypeMap.GEOMETRY)) {
+                    sql.append(quote).append(columns[i].getName()).append(quote)
+                    .append(" = ST_GEOMFROMTEXT(?)").append(separator);
                 } else {
                     sql.append(quote).append(columns[i].getName()).append(quote).append(" = ?")
                             .append(separator);
Index: symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java
===================================================================
--- symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java	(revision 8112)
+++ symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java	(working copy)
@@ -12,7 +12,7 @@
 
     @Override
     protected String[] getDdlTypes() {
-        return new String[] { "serial", "bigserial", "decimal", "numeric" };
+        return new String[] { "serial", "bigserial", "decimal", "numeric", "geometry" };
     }
 
 }
issue-166.patch (2,360 bytes)   

Related Changesets

SymmetricDS: master ffcaf64f

2014-03-27 13:12:16

erilong

Details Diff
0000166: Integrate changes to support spatial/geometric data replication with PostGIS Affected Issues
0000166
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDmlStatement.java Diff File
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java Diff File

SymmetricDS: master 8a32df96

2014-03-27 13:48:30

erilong

Details Diff
0000166: Integrate changes to support spatial/geometric data replication with PostGIS - back out this test until we add PostGIS extension to build server Affected Issues
0000166
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java Diff File

Issue History

Date Modified Username Field Change
2012-06-18 18:12 admin Target Version 3.1.0 =>
2014-02-04 15:43 elong Priority high => normal
2014-02-04 15:43 elong Severity minor => feature
2014-02-04 15:43 elong Product Version 2.0.beta.3 =>
2014-02-04 15:43 elong Fixed in Version 3.1.0 =>
2014-03-27 14:29 cronjefourie Note Added: 0000500
2014-03-27 14:29 cronjefourie File Added: issue-166.patch
2014-03-27 18:00 Changeset attached => SymmetricDS trunk r8114
2014-03-27 18:00 Changeset attached => SymmetricDS trunk r8116
2014-03-27 19:23 elong Assigned To => elong
2014-03-27 19:23 elong Status new => resolved
2014-03-27 19:23 elong Resolution open => fixed
2014-03-27 19:23 elong Product Version => 3.6.0
2014-03-27 19:23 elong Fixed in Version => 3.6.0
2014-03-27 19:23 elong Target Version => 3.6.0
2014-06-17 00:27 chenson Status resolved => closed
2015-07-31 01:49 Changeset attached => SymmetricDS master 8a32df96
2015-07-31 01:49 Changeset attached => SymmetricDS master ffcaf64f