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

Compute COPY attribute list using SQL. #661

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

dimitri
Copy link
Owner

@dimitri dimitri commented Jan 31, 2024

Before embedding SQLite we could not depend on aggregates FILTER clause to be available, and as a result we had to aggregate the attribute list in our own C code. Turns out we had strange bugs around that, that hopefully the very simple SQL query will not have.

Should fix #657
Should fix #634

@dimitri dimitri added the bug Something isn't working label Jan 31, 2024
@dimitri dimitri added this to the v0.16 milestone Jan 31, 2024
@dimitri dimitri requested a review from hanefi January 31, 2024 15:08
@dimitri dimitri self-assigned this Jan 31, 2024
Copy link
Contributor

@hanefi hanefi left a comment

Choose a reason for hiding this comment

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

All good except for a small comment.

I failed to reproduce the original issue. If I could repro, I was planning to suggest adding a test case. I guess we do not need to worry about that.

src/bin/pgcopydb/table-data.c Show resolved Hide resolved
Before embedding SQLite we could not depend on aggregates FILTER clause to
be available, and as a result we had to aggregate the attribute list in our
own C code. Turns out we had strange bugs around that, that hopefully the
very simple SQL query will not have.
@dimitri dimitri merged commit a7889df into main Feb 6, 2024
18 checks passed
@dimitri dimitri deleted the fix/copy-attribute-list branch February 6, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR: syntax error at or near "," Syntax error in pg_restore from improperly generated copy SQL
2 participants