{"id":13707959,"url":"https://github.com/pgjdbc/pgjdbc","last_synced_at":"2026-04-28T22:01:02.919Z","repository":{"id":2402865,"uuid":"3370128","full_name":"pgjdbc/pgjdbc","owner":"pgjdbc","description":"Postgresql JDBC Driver","archived":false,"fork":false,"pushed_at":"2026-04-20T16:11:20.000Z","size":47055,"stargazers_count":1703,"open_issues_count":621,"forks_count":924,"subscribers_count":78,"default_branch":"master","last_synced_at":"2026-04-22T04:37:39.914Z","etag":null,"topics":["java","jdbc","postgresql"],"latest_commit_sha":null,"homepage":"https://jdbc.postgresql.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgjdbc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-02-06T19:30:35.000Z","updated_at":"2026-04-20T16:11:25.000Z","dependencies_parsed_at":"2023-07-05T17:00:15.760Z","dependency_job_id":"86f905c6-23fb-401f-ba06-fc529694e76e","html_url":"https://github.com/pgjdbc/pgjdbc","commit_stats":{"total_commits":3390,"total_committers":332,"mean_commits":"10.210843373493976","dds":0.8300884955752212,"last_synced_commit":"cf3d8e5ed1bca96873735a8731ed4082132361a5"},"previous_names":[],"tags_count":256,"template":false,"template_full_name":null,"purl":"pkg:github/pgjdbc/pgjdbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgjdbc%2Fpgjdbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgjdbc%2Fpgjdbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgjdbc%2Fpgjdbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgjdbc%2Fpgjdbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgjdbc","download_url":"https://codeload.github.com/pgjdbc/pgjdbc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgjdbc%2Fpgjdbc/sbom","scorecard":{"id":355355,"data":{"date":"2025-08-18T08:41:38Z","repo":{"name":"github.com/pgjdbc/pgjdbc","commit":"0002d4b2e9de28af0fe0e63a5821f65ed23e245b"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":7.7,"checks":[{"name":"Code-Review","score":8,"reason":"Found 26/30 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 19 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: RenovateBot: renovate.json:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:40","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:43","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:44","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/gradle-dependency-submit.yaml:18","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release-drafter.yml:22","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:18","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/release.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/buildcache.yml:13","Info: topLevel permissions set to 'read-all': .github/workflows/codeql.yml:23","Info: topLevel 'contents' permission set to 'read': .github/workflows/debezium.yml:7","Info: topLevel 'contents' permission set to 'read': .github/workflows/fedora-copr-build.yml:10","Info: topLevel permissions set to 'read-all': .github/workflows/gradle-dependency-submit.yaml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/gradle-wrapper-validation.yml:5","Info: topLevel 'contents' permission set to 'read': .github/workflows/main.yml:25","Info: topLevel 'contents' permission set to 'read': .github/workflows/nightlysnapshot.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/omni.yml:39","Info: topLevel permissions set to 'read-all': .github/workflows/ossf-scorecard.yaml:20","Info: topLevel permissions set to 'read-all': .github/workflows/pgp-key-maintenance.yaml:6","Info: topLevel permissions set to 'read-all': .github/workflows/release-drafter.yml:12","Warn: no topLevel permission defined: .github/workflows/release.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:152","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:199","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:228","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:235","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:253","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:263","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/main.yml:272","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:289","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:297","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:312","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:326","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:330","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/omni.yml:344","Warn: downloadThenRun not pinned by hash: .github/workflows/fedora-copr-build.yml:33","Info:  42 out of  42 GitHub-owned GitHubAction dependencies pinned","Info:  20 out of  20 third-party GitHubAction dependencies pinned","Info:   1 out of   1 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact REL42.7.7 not signed: https://api.github.com/repos/pgjdbc/pgjdbc/releases/221733787","Warn: release artifact REL42.7.6 not signed: https://api.github.com/repos/pgjdbc/pgjdbc/releases/194763152","Warn: release artifact REL42.7.5 not signed: https://api.github.com/repos/pgjdbc/pgjdbc/releases/171559336","Warn: release artifact REL42.7.4 not signed: https://api.github.com/repos/pgjdbc/pgjdbc/releases/147455529","Warn: release artifact REL42.7.3 not signed: https://api.github.com/repos/pgjdbc/pgjdbc/releases/132920423","Warn: release artifact REL42.7.7 does not have provenance: https://api.github.com/repos/pgjdbc/pgjdbc/releases/221733787","Warn: release artifact REL42.7.6 does not have provenance: https://api.github.com/repos/pgjdbc/pgjdbc/releases/194763152","Warn: release artifact REL42.7.5 does not have provenance: https://api.github.com/repos/pgjdbc/pgjdbc/releases/171559336","Warn: release artifact REL42.7.4 does not have provenance: https://api.github.com/repos/pgjdbc/pgjdbc/releases/147455529","Warn: release artifact REL42.7.3 does not have provenance: https://api.github.com/repos/pgjdbc/pgjdbc/releases/132920423"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'allow deletion' disabled on branch 'release/42.5.x'","Info: 'allow deletion' disabled on branch 'release/42.4.x'","Info: 'allow deletion' disabled on branch 'release/42.3.x'","Info: 'force pushes' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'release/42.5.x'","Info: 'force pushes' disabled on branch 'release/42.4.x'","Info: 'force pushes' disabled on branch 'release/42.3.x'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'release/42.5.x'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'release/42.4.x'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'release/42.3.x'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'release/42.5.x'","Warn: 'stale review dismissal' is disabled on branch 'release/42.4.x'","Warn: 'stale review dismissal' is disabled on branch 'release/42.3.x'","Warn: branch 'master' does not require approvers","Warn: branch 'release/42.5.x' does not require approvers","Warn: branch 'release/42.4.x' does not require approvers","Warn: branch 'release/42.3.x' does not require approvers","Warn: codeowners review is not required on branch 'master'","Warn: codeowners review is not required on branch 'release/42.5.x'","Warn: codeowners review is not required on branch 'release/42.4.x'","Warn: codeowners review is not required on branch 'release/42.3.x'","Warn: 'last push approval' is disabled on branch 'master'","Warn: 'last push approval' is disabled on branch 'release/42.5.x'","Warn: 'last push approval' is disabled on branch 'release/42.4.x'","Warn: 'last push approval' is disabled on branch 'release/42.3.x'","Warn: 'up-to-date branches' is disabled on branch 'master'","Warn: 'up-to-date branches' is disabled on branch 'release/42.5.x'","Warn: 'up-to-date branches' is disabled on branch 'release/42.4.x'","Warn: 'up-to-date branches' is disabled on branch 'release/42.3.x'","Info: status check found to merge onto on branch 'master'","Info: status check found to merge onto on branch 'release/42.5.x'","Info: status check found to merge onto on branch 'release/42.4.x'","Info: status check found to merge onto on branch 'release/42.3.x'","Info: PRs are required in order to make changes on branch 'master'","Info: PRs are required in order to make changes on branch 'release/42.5.x'","Info: PRs are required in order to make changes on branch 'release/42.4.x'","Info: PRs are required in order to make changes on branch 'release/42.3.x'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}},{"name":"Contributors","score":10,"reason":"project has 34 contributing companies or organizations","details":["Info: found contributions from: 2ndQuadrant, AXLEproject, JavaMoney, altametris, autostyle, aws, cerner, csutils, devexp-db, edb, enterprisedb, fedora-copr, gnulib-modules, jackdb, jugnicaragua, konflux-ci, libusual, lonocloud, mend, mojohaus, netceteragroup, netcracker, ngs-doo, oracle, pgbouncer, pgjdbc, postgres, python-progress, redhatofficial, release-engineering, roiai-org, rpm-software-management, w4software, yandex"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}}]},"last_synced_at":"2025-08-18T09:24:36.671Z","repository_id":2402865,"created_at":"2025-08-18T09:24:36.672Z","updated_at":"2025-08-18T09:24:36.672Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32234730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jdbc","postgresql"],"created_at":"2024-08-02T22:01:50.789Z","updated_at":"2026-04-28T22:01:02.903Z","avatar_url":"https://github.com/pgjdbc.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"\u003cimg height=\"90\" alt=\"Slonik Duke\" align=\"right\" src=\"docs/static/images/slonik_duke.png\" /\u003e\n\n# PostgreSQL JDBC Driver\n\nPostgreSQL JDBC Driver (PgJDBC for short) allows Java programs to connect to a PostgreSQL database using standard, database independent Java code. Is an open source JDBC driver written in Pure Java (Type 4), and communicates in the PostgreSQL native network protocol.\n\n### Status\n[![GitHub CI](https://github.com/pgjdbc/pgjdbc/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/pgjdbc/pgjdbc/actions/workflows/main.yml)\n[![Build status](https://ci.appveyor.com/api/projects/status/d8ucmegnmourohwu/branch/master?svg=true)](https://ci.appveyor.com/project/davecramer/pgjdbc/branch/master)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/pgjdbc/pgjdbc/badge)](https://scorecard.dev/viewer/?uri=github.com/pgjdbc/pgjdbc)\n[![codecov.io](http://codecov.io/github/pgjdbc/pgjdbc/coverage.svg?branch=master)](http://codecov.io/github/pgjdbc/pgjdbc?branch=master)\n[![License](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![Join the chat at https://gitter.im/pgjdbc/pgjdbc](https://badges.gitter.im/pgjdbc/pgjdbc.svg)](https://gitter.im/pgjdbc/pgjdbc?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.postgresql/postgresql)](https://maven-badges.herokuapp.com/maven-central/org.postgresql/postgresql)\n[![Javadocs](http://javadoc.io/badge/org.postgresql/postgresql.svg)](http://javadoc.io/doc/org.postgresql/postgresql)\n\n## Supported PostgreSQL and Java versions\nThe current version of the driver should be compatible with **PostgreSQL 8.4 and higher** using the version 3.0 of the protocol and **Java 8** (JDBC 4.2) or above. Unless you have unusual requirements (running old applications or JVMs), this is the driver you should be using.\n\nPgJDBC regression tests are run against all PostgreSQL versions since 9.1, including \"build PostgreSQL from git master\" version. There are other derived forks of PostgreSQL but they have not been certified to run with PgJDBC. If you find a bug or regression on supported versions, please file an [Issue](https://github.com/pgjdbc/pgjdbc/issues).\n\n\u003e **Note:** PgJDBC versions since 42.8.0 are not guaranteed to work with PostgreSQL older than 9.1.\n\n## Get the Driver\nMost people do not need to compile PgJDBC. You can download the precompiled driver (jar) from the [PostgreSQL JDBC site](https://jdbc.postgresql.org/download/) or using your chosen dependency management tool:\n\n### Maven Central\nYou can search on The Central Repository with GroupId and ArtifactId [org.postgresql:postgresql][mvn-search].\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.postgresql/postgresql)](https://central.sonatype.com/artifact/org.postgresql/postgresql)\n\n```xml\n\u003c!-- Add the following dependency to your pom.xml, --\u003e\n\u003c!-- replacing LATEST with specific version as required --\u003e\n\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.postgresql\u003c/groupId\u003e\n  \u003cartifactId\u003epostgresql\u003c/artifactId\u003e\n  \u003cversion\u003eLATEST\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n[mvn-search]: https://central.sonatype.com/artifact/org.postgresql/postgresql \"Search on Maven Central\"\n\n#### Development snapshots\nSnapshot builds (builds from `master` branch) are also deployed to OSS Sonatype Snapshot Repository, so you can test current development version (test some bugfix) by enabling the repository and using the latest [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/postgresql/postgresql/) version.\n\nThere are also available (snapshot) binary RPMs in [Fedora's Copr repository](https://copr.fedorainfracloud.org/coprs/g/pgjdbc/pgjdbc-travis/).\n\n----------------------------------------------------\n## Documentation\nFor more information you can read [the PgJDBC driver documentation](https://jdbc.postgresql.org/documentation/) or for general JDBC documentation please refer to [The Java™ Tutorials](http://docs.oracle.com/javase/tutorial/jdbc/).\n\n### Driver and DataSource class\n\n| Implements                          | Class                                          |\n| ----------------------------------- | ---------------------------------------------- |\n| java.sql.Driver                     | **org.postgresql.Driver**                      |\n| javax.sql.DataSource                | org.postgresql.ds.PGSimpleDataSource           |\n| javax.sql.ConnectionPoolDataSource  | org.postgresql.ds.PGConnectionPoolDataSource   |\n| javax.sql.XADataSource              | org.postgresql.xa.PGXADataSource               |\n\n### Building the Connection URL\nThe driver recognises JDBC URLs of the form:\n```\njdbc:postgresql:database\njdbc:postgresql:\njdbc:postgresql://host/database\njdbc:postgresql://host/\njdbc:postgresql://host:port/database\njdbc:postgresql://host:port/\njdbc:postgresql://?service=myservice\n```\nThe general format for a JDBC URL for connecting to a PostgreSQL server is as follows, with items in square brackets ([ ]) being optional:\n```\njdbc:postgresql:[//host[:port]/][database][?property1=value1[\u0026property2=value2]...]\n```\nwhere:\n * **jdbc:postgresql:** (Required) is known as the sub-protocol and is constant.\n * **host** (Optional) is the server address to connect. This could be a DNS or IP address, or it could be *localhost* or *127.0.0.1* for the local computer. To specify an IPv6 address your must enclose the host parameter with square brackets (jdbc:postgresql://[::1]:5740/accounting). Defaults to `localhost`.\n * **port** (Optional) is the port number listening on the host. Defaults to `5432`.\n * **database** (Optional) is the database name. Defaults to the same name as the *user name* used in the connection.\n * **propertyX** (Optional) is one or more option connection properties. For more information see *Connection properties*.\n\n### Logging\nPgJDBC uses java.util.logging for logging.\nTo configure log levels and control log output destination (e.g. file or console), configure your java.util.logging properties accordingly for the org.postgresql logger.\nNote that the most detailed log levels, \"`FINEST`\", may include sensitive information such as connection details, query SQL, or command parameters.\n\n#### Connection Properties\nIn addition to the standard connection parameters the driver supports a number of additional properties which can be used to specify additional driver behaviour specific to PostgreSQL™. These properties may be specified in either the connection URL or an additional Properties object parameter to DriverManager.getConnection.\n\n| Property                      | Type |         Default         | Description                                                                                                                                                                                                                                                                                                                                     |\n|-------------------------------| -- |:-----------------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| user                          | String |          null           | The database user on whose behalf the connection is being made.                                                                                                                                                                                                                                                                               |\n| password                      | String |          null           | The database user's password.                                                                                                                                                                                                                                                                                                                 |\n| options                       | String |          null           | Specify 'options' connection initialization parameter.                                                                                                                                                                                                                                                                                        |\n| service                       | String |          null           | Specify 'service' name described in pg_service.conf file. References: [The Connection Service File](https://www.postgresql.org/docs/current/libpq-pgservice.html) and [The Password File](https://www.postgresql.org/docs/current/libpq-pgpass.html). 'service' file can provide all properties including 'hostname=', 'port=' and 'dbname='. |\n| ssl                           | Boolean |          false          | Control use of SSL (true value causes SSL to be required)                                                                                                                                                                                                                                                                                    |\n| sslfactory                    | String | org.postgresql.ssl.LibPQFactory | Provide a SSLSocketFactory class when using SSL.                                                                                                                                                                                                                                                                                      |\n| sslfactoryarg (deprecated)    | String |          null           | Argument forwarded to constructor of SSLSocketFactory class.                                                                                                                                                                                                                                                                                  |\n| sslmode                       | String |         prefer          | Controls the preference for opening using an SSL encrypted connection.                                                                                                                                                                                                                                                                        |\n| sslcert                       | String |          null           | The location of the client's SSL certificate                                                                                                                                                                                                                                                                                                  |\n| sslkey                        | String |          null           | The location of the client's PKCS#8 or PKCS#12 SSL key, for PKCS the extension must be .p12 or .pfx and the alias must be `user`                                                                                                                                                                                                              |\n| sslrootcert                   | String |          null           | The location of the root certificate for authenticating the server.                                                                                                                                                                                                                                                                           |\n| sslhostnameverifier           | String |          null           | The name of a class (for use in [Class.forName(String)](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#forName%28java.lang.String%29)) that implements javax.net.ssl.HostnameVerifier and can verify the server hostname.                                                                                                     |\n| sslpasswordcallback           | String |          null           | The name of a class (for use in [Class.forName(String)](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#forName%28java.lang.String%29)) that implements javax.security.auth.callback.CallbackHandler and can handle PasswordCallback for the ssl password.                                                                     |\n| sslpassword                   | String |          null           | The password for the client's ssl key (ignored if sslpasswordcallback is set)                                                                                                                                                                                                                                                                 |\n| sslnegotiation                | String |        postgres         | Determines if ALPN ssl negotiation will be used or not. Set to `direct` to choose ALPN.                                                                                                                                                                                                                                                       |\n| sendBufferSize                | Integer |           -1            | Socket write buffer size                                                                                                                                                                                                                                                                                                                     |\n| maxSendBufferSize             | Integer |        65536            | Maximum amount of bytes buffered before sending to the backend. pgjdbc uses `least(maxSendBufferSize, greatest(8192, SO_SNDBUF))` to determine the buffer size.                                                                                                                                                                              |\n| receiveBufferSize             | Integer |           -1            | Socket read buffer size                                                                                                                                                                                                                                                                                                                      |\n| logServerErrorDetail          | Boolean |          true           | Allows server error detail (such as sql statements and values) to be logged and passed on in exceptions.  Setting to false will mask these errors so they won't be exposed to users, or logs.                                                                                                                                                |\n| allowEncodingChanges          | Boolean |          false          | Allow for changes in client_encoding                                                                                                                                                                                                                                                                                                         |\n| logUnclosedConnections        | Boolean |          false          | When connections that are not explicitly closed are garbage collected, log the stacktrace from the opening of the connection to trace the leak source                                                                                                                                                                                        |\n| binaryTransfer                | Boolean |          true           | Enable binary transfer for supported built-in types if possible. Setting this to false disables any binary transfer unless it's individually activated for each type with `binaryTransferEnable`. Whether it is possible to use binary transfer at all depends on server side prepared statements (see `prepareThreshold` ).                 |\n| binaryTransferEnable          | String |           \"\"            | Comma separated list of types to enable binary transfer. Either OID numbers or names.                                                                                                                                                                                                                                                         |\n| binaryTransferDisable         | String |           \"\"            | Comma separated list of types to disable binary transfer. Either OID numbers or names. Overrides values in the driver default set and values set with binaryTransferEnable.                                                                                                                                                                   |\n| prepareThreshold              | Integer |            5            | Determine the number of `PreparedStatement` executions required before switching over to use server side prepared statements. The default is five, meaning start using server side prepared statements on the fifth execution of the same `PreparedStatement` object. A value of -1 activates server side prepared statements and forces binary transfer for enabled types (see `binaryTransfer` ). |\n| preparedStatementCacheQueries | Integer |           256           | Specifies the maximum number of entries in per-connection cache of prepared statements. A value of 0 disables the cache.                                                                                                                                                                                                                     |\n| preparedStatementCacheSizeMiB | Integer |            5            | Specifies the maximum size (in megabytes) of a per-connection prepared statement cache. A value of 0 disables the cache.                                                                                                                                                                                                                     |\n| defaultRowFetchSize           | Integer |            0            | Positive number of rows that should be fetched from the database when more rows are needed for ResultSet by each fetch iteration                                                                                                                                                                                                             |\n| queryTimeout                  | Integer |            0            | The timeout value in seconds that the driver will wait for a query to execute if not explicitly set by [Statement.setQueryTimeout(int)](https://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#setQueryTimeout%28int%29)). A value of 0 means no timeout.                                                                         |\n| loginTimeout                  | Integer |            0            | Specify how long in seconds max(2147484) to wait for establishment of a database connection.                                                                                                                                                                                                                                                 |\n| connectTimeout                | Integer |           10            | The timeout value in seconds max(2147484) used for socket connect operations.                                                                                                                                                                                                                                                                |\n| socketTimeout                 | Integer |            0            | The timeout value in seconds max(2147484) used for socket read operations.                                                                                                                                                                                                                                                                   |\n| cancelSignalTimeout           | Integer |            10           | The timeout that is used for sending cancel command.                                                                                                                                                                                                                                                                                         |\n| sslResponseTimeout            | Integer |          5000           | Socket timeout in milliseconds waiting for a response from a request for SSL upgrade from the server.                                                                                                                                                                                                                                        |\n| tcpKeepAlive                  | Boolean |          false          | Enable or disable TCP keep-alive.                                                                                                                                                                                                                                                                                                            |\n| tcpNoDelay                    | Boolean |          true           | Enable or disable TCP no delay.                                                                                                                                                                                                                                                                                                              |\n| ApplicationName               | String  | PostgreSQL JDBC Driver   | The application name (require server version \u003e= 9.0). If assumeMinServerVersion is set to \u003e= 9.0 this will be sent in the startup packets, otherwise after the connection is made                                                                                                                                                           |\n| readOnly                      | Boolean |          false          | Puts this connection in read-only mode                                                                                                                                                                                                                                                                                                       |\n| readOnlyMode                  | String |          transaction   | Specifies the behavior when a connection is set to be read only, possible values: ignore, transaction, always                                                                                                                                                                                                                                  |\n| disableColumnSanitiser        | Boolean |          false          | Enable optimization that disables column name sanitiser                                                                                                                                                                                                                                                                                      |\n| assumeMinServerVersion        | String |          null           | Assume the server is at least that version                                                                                                                                                                                                                                                                                                    |\n| currentSchema                 | String |          null           | Specify the schema (or several schema separated by commas) to be set in the search-path                                                                                                                                                                                                                                                       |\n| targetServerType              | String |           any           | Specifies what kind of server to connect, possible values: any, master, slave (deprecated), secondary, preferSlave (deprecated), preferSecondary, preferPrimary                                                                                                                                                                               |\n| hostRecheckSeconds            | Integer |           10            | Specifies period (seconds) after which the host status is checked again in case it has changed                                                                                                                                                                                                                                               |\n| loadBalanceHosts              | Boolean |          false          | If disabled hosts are connected in the given order. If enabled hosts are chosen randomly from the set of suitable candidates                                                                                                                                                                                                                 |\n| socketFactory                 | String |          null           | Specify a socket factory for socket creation                                                                                                                                                                                                                                                                                                  |\n| socketFactoryArg (deprecated) | String |          null           | Argument forwarded to constructor of SocketFactory class.                                                                                                                                                                                                                                                                                     |\n| autosave                      | String |          never          | Specifies what the driver should do if a query fails, possible values: always, never, conservative                                                                                                                                                                                                                                            |\n| cleanupSavepoints             | Boolean |          false          | In Autosave mode the driver sets a SAVEPOINT for every query. It is possible to exhaust the server shared buffers. Setting this to true will release each SAVEPOINT at the cost of an additional round trip.                                                                                                                                 |\n| preferQueryMode               | String |        extended         | Specifies which mode is used to execute queries to database, possible values: extended, extendedForPrepared, extendedCacheEverything, simple                                                                                                                                                                                                  |\n| reWriteBatchedInserts         | Boolean |          false          | Enable optimization to rewrite and collapse compatible INSERT statements that are batched.                                                                                                                                                                                                                                                   |\n| escapeSyntaxCallMode          | String |         select          | Specifies how JDBC escape call syntax is transformed into underlying SQL (CALL/SELECT), for invoking procedures or functions (requires server version \u003e= 11), possible values: select, callIfNoReturn, call                                                                                                                                   |\n| maxResultBuffer               | String |          null           | Specifies size of result buffer in bytes, which can't be exceeded during reading result set. Can be specified as particular size (i.e. \"100\", \"200M\" \"2G\") or as percent of max heap memory (i.e. \"10p\", \"20pct\", \"50percent\")                                                                                                                |\n| gssLib                        | String |          auto           | Permissible values are auto (default, see below), sspi (force SSPI) or gssapi (force GSSAPI-JSSE).                                                                                                                                                                                                                                            |\n| gssResponseTimeout            | Integer |          5000           | Socket timeout in milliseconds waiting for a response from a request for GSS encrypted connection from the server.                                                                                                                                                                                                                           |\n| gssEncMode                    | String |          allow          | Controls the preference for using GSSAPI encryption for the connection, values are disable, allow, prefer, and require                                                                                                                                                                                                                        |\n| useSpnego                     | String |          false           | Use SPNEGO in SSPI authentication requests                                                                                                                                                                                                                                                                                                   |\n| adaptiveFetch                 | Boolean |          false          | Specifies if number of rows fetched in ResultSet by each fetch iteration should be dynamic. Number of rows will be calculated by dividing maxResultBuffer size into max row size observed so far. Requires declaring maxResultBuffer and defaultRowFetchSize for first iteration.                                                            |\n| adaptiveFetchMinimum          | Integer |            0            | Specifies minimum number of rows, which can be calculated by adaptiveFetch. Number of rows used by adaptiveFetch cannot go below this value.                                                                                                                                                                                                 |\n| adaptiveFetchMaximum          | Integer |           -1            | Specifies maximum number of rows, which can be calculated by adaptiveFetch. Number of rows used by adaptiveFetch cannot go above this value. Any negative number set as adaptiveFetchMaximum is used by adaptiveFetch as infinity number of rows.                                                                                            |\n| localSocketAddress            | String |          null           | Hostname or IP address given to explicitly configure the interface that the driver will bind the client side of the TCP/IP connection to when connecting.                                                                                                                                                                                     |\n| quoteReturningIdentifiers     | Boolean |          true           | By default we double quote returning identifiers. Some ORM's already quote them. Switch allows them to turn this off                                                                                                                                                                                                                         |\n| requireAuth                   | String |          null           | Comma-separated list of acceptable authentication methods. Use '!' prefix to reject methods (e.g., '!password' to reject cleartext). Supported: password, md5, gss, sspi, scram-sha-256, none. Cannot mix positive and negative options.                                                                                                    |\n| authenticationPluginClassName | String |          null           | Fully qualified class name of the class implementing the AuthenticationPlugin interface. If this is null, the password value in the connection properties will be used.                                                                                                                                                                       |\n| unknownLength                 | Integer |   Integer.MAX_LENGTH    | Specifies the length to return for types of unknown length                                                                                                                                                                                                                                                                                   |\n| stringtype                    | String |          null           | Specify the type to use when binding `PreparedStatement` parameters set via `setString()`                                                                                                                                                                                                                                                     |\n| channelBinding                 | String |   prefer    | This option controls the client's use of channel binding. `require` means that the connection must employ channel binding, `prefer` means that the client will choose channel binding if available, and `disable` prevents the use of channel binding.                                                                                                   |\n\n#### System Properties\n| Property                      | Type |         Default         | Description                                                                                                                                                                                                                                                                                                                                     |\n|-------------------------------| -- |:-----------------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------    |\n| pgjdbc.config.cleanup.thread.ttl | long | 30000 |  The driver has an internal cleanup thread which monitors and cleans up unclosed connections. This property sets the duration (in milliseconds) the cleanup thread will keep running if there is nothing to clean up. |\n\n## Contributing\nFor information on how to contribute to the project see the [Contributing Guidelines](CONTRIBUTING.md)\n\n----------------------------------------------------\n### Sponsors\n\n* [PostgreSQL International](http://www.postgresintl.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgjdbc%2Fpgjdbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgjdbc%2Fpgjdbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgjdbc%2Fpgjdbc/lists"}