View Issue Details

IDProjectCategoryView StatusLast Update
0002003SymmetricDSBugpublic2021-08-17 17:07
Reporterrotten Assigned Tochenson  
Prioritynormal 
Status resolvedResolutionfixed 
Product Version3.6.9 
Target Version3.6.9Fixed in Version3.6.9 
Summary0002003: daterange data type doesn't replicate
DescriptionThe PostgreSQL daterange data type is stubbornly refusing to be pushed through my SymmetricDS replication stream.

ERROR: column "active_date_range" is of type daterange but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.

This seems to happen when the daterange type is <null>.

We are using PostgreSQL 9.3, but this data type has been around for a few years.
Steps To ReproduceSet up a nullable daterange column for replication and add a few rows of data.
Tagsdata type, dialect: postgresql

Activities

chenson

2014-10-07 19:51

administrator   ~0000587

In a quick test this worked for me. What does your jdbc url look like? Mine has the following properties set:

protocolVersion=2&stringtype=unspecified&socketTimeout=300

rotten

2014-10-08 00:46

reporter   ~0000588

I have stringtype=unspecified on 2 of my 3 nodes. The one that is having the problem did not have it.

I set it, restarted the node and tried replicating the row again. Sadly it failed again - same error.

I added protocolVersion=2 to the jdbc line to the sending side of this replication path, and the row with the null daterange entry still wouldn't replicate. Same error.

I added protocolVersion=2 to the receiving side, and it went through.

I'm not sure what it means, but it works for me, thanks!

rudiejd

2021-08-17 17:07

developer   ~0001998

Solution in comments - add protocol version 2 to JDBC url on both sides

Issue History

Date Modified Username Field Change
2014-10-07 18:21 rotten New Issue
2014-10-07 19:51 chenson Note Added: 0000587
2014-10-08 00:46 rotten Note Added: 0000588
2019-04-23 12:09 elong Tag Attached: data type
2019-04-23 12:09 elong Tag Attached: postgresql
2019-04-23 20:50 admin Tag Renamed postgresql => dialect: postgresql
2021-08-17 17:05 rudiejd Assigned To => chenson
2021-08-17 17:05 rudiejd Status new => assigned
2021-08-17 17:07 rudiejd Status assigned => resolved
2021-08-17 17:07 rudiejd Resolution open => fixed
2021-08-17 17:07 rudiejd Fixed in Version => 3.6.9
2021-08-17 17:07 rudiejd Note Added: 0001998