Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-6001

Postgresql connector parses the null of the money type into 0

XMLWordPrintable

    • False
    • None
    • False

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      debezium-connector-postgres 2.1.1.Final

      What is the connector configuration?

      {     "snapshot.mode":"never",     "database.user":"postgres",     "offset.flush.interval.ms":"2000",     "database.password":"********",     "offset.storage":"org.apache.kafka.connect.storage.FileOffsetBackingStore",     "database.server.name":"pg_connector",     "offset.storage.file.filename":"../conf/offset",     "slot.drop.on.stop":"false",     "connector.class":"io.debezium.connector.postgresql.PostgresConnector",     "database.port":"16234",     "slot.name":"pg_slot",     "tombstones.on.delete":"false",     "database.hostname":"xx.xx.xx.xx",     "database.dbname":"test",     "interval.handling.mode":"string",     "plugin.name":"decoderbufs",     "name":"pg_selector" }

      What is the captured database version and mode of depoyment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      PostgreSQL v.12.3,  on-premises

      What behaviour do you expect?

      The expected result is null but not 0 after executing Insert sql without setting any value of money type.

      What behaviour do you see?

      The real result is 0. Thus  it is impossible to distinguish whether 0 is inserted or no value is set

      Do you see the same behaviour using the latest relesead Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      Yes, 2.1.1-Final still exists the problem.

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      <Your answer>

      How to reproduce the issue using our tutorial deployment?

      1. CREATE TABLE "public"."debezium_test" (
            "id" int4 NOT NULL,
            "myMONEY" money,
        CONSTRAINT "debe_test_pkey" PRIMARY KEY ( "id" ) 
        );
      2. Run debezium
      3. insert into "public"."debezium_test"(id) values(10);

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      <Your answer>

              Unassigned Unassigned
              leoloel xing Leo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: