Skip to content

Infer types when clients specify a bind argument with OID zero#1336

Merged
fulghum merged 1 commit intomainfrom
fulghum/binding
Mar 28, 2025
Merged

Infer types when clients specify a bind argument with OID zero#1336
fulghum merged 1 commit intomainfrom
fulghum/binding

Conversation

@fulghum
Copy link
Copy Markdown
Contributor

@fulghum fulghum commented Mar 26, 2025

When specifying parameters for a prepared query, callers can specify OID zero to instruct the server to infer the type. Doltgres was error'ing out in this case, because it couldn't find a valid OID registered for zero. This changes Doltgres to infer types when the specified parameter OIDs contains a zero.

Found while testing a basic Rails app with Doltgres.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2025

Main PR
covering_index_scan_postgres 346.44/s 347.76/s +0.3%
index_join_postgres 149.61/s 149.49/s -0.1%
index_join_scan_postgres 182.97/s 182.36/s -0.4%
index_scan_postgres 12.31/s 12.39/s +0.6%
oltp_point_select 2548.36/s 2528.27/s -0.8%
oltp_read_only 1769.10/s 1768.82/s -0.1%
select_random_points 109.99/s 108.60/s -1.3%
select_random_ranges 129.52/s 129.48/s -0.1%
table_scan_postgres 10.31/s 10.17/s -1.4%
types_table_scan_postgres 5.42/s 5.31/s -2.1%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2025

Main PR
Total 42090 42090
Successful 15568 15568
Failures 26522 26522
Partial Successes1 5208 5208
Main PR
Successful 36.9874% 36.9874%
Failures 63.0126% 63.0126%

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@fulghum fulghum changed the title Infer types when clients specify a bind argument with OID 0 Infer types when clients specify a bind argument with OID zero Mar 28, 2025
@fulghum fulghum marked this pull request as ready for review March 28, 2025 21:12
Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM, nice fix

@fulghum fulghum merged commit cb731fa into main Mar 28, 2025
14 checks passed
@fulghum fulghum deleted the fulghum/binding branch March 28, 2025 22:31
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.

2 participants