-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support :pg_auto_parameterize_min_array_size Database option in pg_au…
…to_parameterize_in_array extension to control minimum array size to handle The default of converting only arrays with 2 or more elements was to match PostgreSQL's handling of IN (value_list), where a single element is converted to a scalar = expression, and multiple elements are converted to a = ANY(ARRAY[expr1, expr2, ...]) expression. Unfortunately, not doing the conversion for single element arrays has the negative side effect of missing cases that you would want to handle specially, if your tests only test cases where the array has one element and not multiple elements. This allows the user to choose the minimum size of the array to be converted. You could set it to 0 and not 1, but that wouldn't convert the empty array case, as the type is not known.
- Loading branch information
1 parent
e1145bb
commit 03d32d2
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters