Regarding the issue of PG database date data type containing BC time

14 views
Skip to first unread message

朱义栓(Mr.zhu)

unread,
Oct 28, 2025, 5:19:51 AMOct 28
to debezium
Dear project team:
Thank you for your time!
I encountered a problem with the data in the PG database, which is of the date data type and contains the year BC. debezium error:
Text '0002-11-30 BC' could not be parsed, unparsed text found at index 10
May I ask how to handle the BC time issue without using SMT?

Chris Cranford

unread,
Oct 28, 2025, 5:44:40 AMOct 28
to debe...@googlegroups.com
Hi, 

I'm afraid you've likely hit DBZ-4651 [1], and there is also DBZ-8762 [2]. 

Based on the details in DBZ-4651, this is likely locale-specific where your database is defined with `en_US` locale, but your JVM is running with the default system locale where the Era is not `BC`, and so the decoding of the value fails because of this locale-difference. As a workaround, you can set the JVM locale to be `en_US` and that likely will solve the issue for now.

If you have some free cycles to submit a PR where the value converter uses the database locale for this parsing rather than relying on the JVM locale, we'd welcome the contribution.

Thanks,
-cc

[1]: https://issues.redhat.com/browse/DBZ-4651
[2]: https://issues.redhat.com/browse/DBZ-8762
May I ask how to handle the BC time issue without using SMT? --
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/151b62a3-ce26-496a-9b4e-4351dd06c228n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages