Skip to content

A question about "Columns in the PostgreSQL table that are nullable or have default values may be omitted from the Feldera view" #6694

Description

@fanwhiteout-bit

Official documentation describes the following behavior:

https://docs.feldera.com/connectors/sinks/postgresql/
Image

However, the actual behavior is different:

The PostgreSQL column is defined as:
updated_at timestamp DEFAULT now() NOT NULL

The Feldera SQL table does not include a timestamp field in the sink definition.

The sink operation fails with an error indicating that a null value cannot be inserted into the NOT NULL column, even though a default value (now()) is defined.

After debugging, I traced the issue to this code snippet in the sink implementation:

raw_queries.insert = format!(
r#"INSERT INTO "{table}" SELECT * FROM jsonb_populate_recordset(NULL::"{table}", $1::jsonb) ON CONFLICT {on_conflict}"#,
);

Is there a recommended approach to support auto‑generated timestamps (or other default values) without having to explicitly include the column in the Feldera SQL schema or the INSERT statement?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingconnectorsIssues related to the adapters/connectors crate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions