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

fix: Add explicit parameters limit in PostgreSQL and Redshift drivers #8784

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

mcheshkov
Copy link
Member

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made (if issue reference is not provided)

PostgresDriver uses pg module as a driver, and pg does not check incoming params, and if there's too many it just sends incorrect bind message. It would end up as "expected a lot of params, but 0 was passed" error from server.

RedshiftDriver extends PostgresDriver, but there's another catch: Redshift server misbehaves a little, and breaks on 32768 or more parameters with there is no parameter $-32768.

There's not much we can do about it, but at least we can make error messages clear.

@mcheshkov mcheshkov force-pushed the postgres-redshift-params-limit branch from f4a134c to 8acaf40 Compare October 4, 2024 18:06
Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-react-pivot-table ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 11:27pm

@mcheshkov mcheshkov force-pushed the postgres-redshift-params-limit branch from 8acaf40 to 35ca5a8 Compare October 4, 2024 18:15
@mcheshkov mcheshkov marked this pull request as ready for review October 4, 2024 18:36
@mcheshkov mcheshkov requested a review from a team as a code owner October 4, 2024 18:36
@mcheshkov mcheshkov force-pushed the postgres-redshift-params-limit branch from 35ca5a8 to d66d112 Compare October 4, 2024 23:27
@mcheshkov mcheshkov merged commit ad6abec into master Oct 4, 2024
51 checks passed
@mcheshkov mcheshkov deleted the postgres-redshift-params-limit branch October 4, 2024 23:48
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

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

👍🏻

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.

3 participants