debezium / debezium/dbz

Support Postgres composite types [DBZ-994]

Open
#192 0 comments 0 reactions 0 assignees View on GitHub
component/postgresql-connector migrated-from-jira type/enhancement
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-994](https://issues.redhat.com/browse/DBZ-994)

Postgres [Composite types|https://www.postgresql.org/docs/current/rowtypes.html] allow structured types to be used as column types:

{code}
CREATE TYPE phone AS (
area text,
numb integer
);

ALTER TABLE customers ADD phone_no phone;
{code}

Debezium should capturing values to such columns. Some open questions:

* Are changes to the logical decoding plug-ins needed?
* How to obtain information about the columns contained in a composite type?
* How to represent columns of composite types in emitted CDC messages? Could be done as an equivalent struct or just by adding the contained columns directly to the before/after structs. The latter increases compatibility with consumers, but it loses information about the containing composite type. This might be mitigated by adding the composite type name as a schema parameter of the schemas for the contained columns. That'd be my preference.

Contributor guide

Open the contributing guide

Research direction

Start with the PostgreSQL composite-type example in the issue and investigate the logical decoding plug-ins, how composite-column metadata can be obtained, and how values should appear in emitted CDC messages. Done requires resolving those representation and compatibility questions and supporting captured values for composite-type columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.