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: support queries with up to 65535 (inclusive) parameters #2525

Merged
merged 1 commit into from Jun 1, 2022

Commits on Jun 1, 2022

  1. fix: support queries with up to 65535 (inclusive) parameters

    Previously the execution failed with "Tried to send an out-of-range integer as a 2-byte value"
    when the user attempted executing a query with more than 32767 parameters.
    
    Technically speaking, the wire protocol limit is 2-byte-unsigned-int,
    so we should support 65535 parameters.
    
    In practice, simple mode (preferQueryMode=simple) allows executing queries
    with an arbitrary number of parameters, however, that escape hatch is not recommended
    as it still has limits on the SQL length, and it would likely be slow.
    
    fixes pgjdbc#1311
    vlsi committed Jun 1, 2022
    Copy the full SHA
    6c0c5da View commit details
    Browse the repository at this point in the history