ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Allow `prepareThreshold`, `preparedStatementCacheQueries` and `preparedStatementCacheSizeMiB` to pass 0 values. #7345

Closed daneshk closed 1 week ago

daneshk commented 1 week ago

Description

As per the PostgreSQL documentation[1], we should be able to pass 0 value for the prepareThreshold, preparedStatementCacheQueries and preparedStatementCacheSizeMiB to disable the feature. But in Ballerina PostgreSQL connector doesn't allow to pass 0 value.

  1. https://jdbc.postgresql.org/documentation/use/

Steps to Reproduce

Configure PostgreSQL client to pass like below,

postgresql:Client  dbClient = new (host = postgres_host,
                                              username = postgres_user,
                                              password = postgres_password,
                                              database = postgres_name,
                                              port = postgres_port,
                                              connectionPool = {maxOpenConnections: 5},
                                              options = {
                                                  preparedStatementThreshold: 0
                                              });

Version

Latest

Environment Details (with versions)

No response

daneshk commented 1 week ago

This issue is fixed in the main branch and released 1.13.2 version. Hence, I am closing the issue.