Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replicate Postgres array types #279

Merged
merged 8 commits into from
Dec 13, 2024
Merged

feat: replicate Postgres array types #279

merged 8 commits into from
Dec 13, 2024

Conversation

fanyang01
Copy link
Contributor

@fanyang01 fanyang01 commented Dec 10, 2024

In this PR, array-type columns in Postgres are replicated as DuckDB LIST columns (rather than ARRAY columns, as Postgres does not enforce fixed sizes or dimensions for array values). Additionally, querying LIST columns via the Postgres protocol is supported by mapping DuckDB's LIST types to Postgres' array types.

Resolves #229

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • pgserver/logrepl/replication.go: Evaluated as low risk
  • pgserver/duck_handler.go: Evaluated as low risk
Comments suppressed due to low confidence (2)

pgtest/framework.go:231

  • The change from StringFixed(val.Exp * -1) to String() might affect the precision of the numeric value representation. Consider retaining the original precision handling.
decStr := decimal.NewFromBigInt(val.Int, val.Exp).String()

pgtest/framework.go:290

  • Trimming trailing zeros and then converting back to a decimal might alter the intended precision of the values. Ensure this change does not affect the precision requirements.
s := d.String() // trim trailing zeros

@fanyang01 fanyang01 merged commit e0b181f into main Dec 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replicate postgres array types
1 participant