eulerto / wal2json

JSON output plugin for changeset extraction
BSD 3-Clause "New" or "Revised" License
1.33k stars 161 forks source link

Expose scale and precision for NUMERIC columns #31

Closed gunnarmorling closed 7 years ago

gunnarmorling commented 7 years ago

Hi, for columns such as NUMERIC(10,3), we'll only see NUMERIC as a column type in corresponding messages, i.e. precision and scale are gone. It'd be great to have them, though, in order to derive corresponding schemas on the consumer side.

I'm not sure whether this (easily) can be done in wal2json, so I'm opening this to get a discussion started. For sure it'd be something were we'd benefit very much from in Debezium.

eulerto commented 7 years ago

@gunnarmorling it is possible. I'll take a stab later.

jpechane commented 7 years ago

As I am thinking about it it might be usefult to add it to other types that supoports custom length like varchar, time/date types etc.

eulerto commented 7 years ago

@gunnarmorling @jpechane I'll appreciate if you could test this new feature.

jpechane commented 7 years ago

Looks great, thanks @eulerto.