Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Fix for more than 50 fields in Postgres #662

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Conversation

kindly
Copy link
Contributor

@kindly kindly commented Aug 1, 2023

Postgres does not allow functions that have more that have more than 100 arguments. When using the concat function, this limits comparisons to less than 50 fields.
Using || for concat like the Oracle variant fixes this.

@kindly
Copy link
Contributor Author

kindly commented Aug 4, 2023

Is there anything I can do to help get this merged. As I am trying to do a comparison of over 50 fields in postgres and without this patch, it crashes, so I am having to use my own fork.

@dlawin
Copy link
Contributor

dlawin commented Aug 4, 2023

Relates to #397

@dlawin
Copy link
Contributor

dlawin commented Aug 4, 2023

Is there anything I can do to help get this merged. As I am trying to do a comparison of over 50 fields in postgres and without this patch, it crashes, so I am having to use my own fork.

Thanks for opening this @kindly

If you're up for it adding a test case here would speed things along

There's dev setup info here

Postgres does not allow functions that have more that have more than 100 arguments.
When using the concat function, this limits comparisons to less than 50 fields.
Using || for concat like the Oracle variant fixes this.
@kindly
Copy link
Contributor Author

kindly commented Aug 4, 2023

@dlawin

I have added a test which will fail if you remove the new code.

I had difficulty reproducing the issue in the tests, and only by using the uuid like the other test could I make it fail. This is because the error caused by the checksumming/segmenting, and I think that is only triggered in some conditions.

@dlawin
Copy link
Contributor

dlawin commented Aug 4, 2023

I have added a test which will fail if you remove the new code.

I had difficulty reproducing the issue in the tests, and only by using the uuid like the other test could I make it fail. This is because the error caused by the checksumming/segmenting, and I think that is only triggered in some conditions.

appreciate it @kindly I will take a closer look early next week and get it in a release!

@dlawin dlawin self-requested a review August 4, 2023 23:03
@dlawin dlawin added the bug Something isn't working label Aug 4, 2023
@dlawin dlawin linked an issue Aug 9, 2023 that may be closed by this pull request
@dlawin dlawin merged commit 94814e6 into datafold:master Aug 9, 2023
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comparing more than 50 columns in PostgreSQL throws a PG error
3 participants