{"id":19458509,"url":"https://github.com/postgrespro/pq2jdbc","last_synced_at":"2025-06-14T14:08:09.525Z","repository":{"id":69542849,"uuid":"155104604","full_name":"postgrespro/pq2jdbc","owner":"postgrespro","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-08T16:01:31.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-06-09T15:57:36.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postgrespro.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-28T18:54:35.000Z","updated_at":"2019-11-12T07:24:33.000Z","dependencies_parsed_at":"2023-05-15T16:00:22.840Z","dependency_job_id":null,"html_url":"https://github.com/postgrespro/pq2jdbc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/postgrespro/pq2jdbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpq2jdbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpq2jdbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpq2jdbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpq2jdbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postgrespro","download_url":"https://codeload.github.com/postgrespro/pq2jdbc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpq2jdbc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827662,"owners_count":22917713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-10T17:27:23.891Z","updated_at":"2025-06-14T14:08:09.499Z","avatar_url":"https://github.com/postgrespro.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"pq2jdbc is bridge between PostgreSQL libpq client and any JDBC-compatible database.\nIt's java application, which should be started on some port and simulate Postgres server.\nIt connects through JDBC driver to any JDBC-compatible database, redirects libpq requests\nto it and receives replies.\n\nWhy it is needed?\nThe primary goal of this application was to provide access from Postgres\nto HIVE and Apache Ignite. There is Postgres JDBC FDW https://github.com/atris/JDBC_FDW\nbut it has the following limitations:\n1. It is read-only and doesn't support updates.\n2. It establishes new connection on each query, so speed is awful.\n\nCertainly it is possible to impalement improved version of this FDW.\nBut development of good FDW (supporting index scans, push-downs, ...) is quite sophisticated task.\nThe idea was to use postgres_fdw and connect through pq2jdbc bridge to any JDBC-compatible database.\n\nAnother use case (not sure how useful it is) is to allow postgres unities and clients to access another\ndatabases. For example it is possible to use pgbench to benchmark mySQL or Oracle.\n\nIf somebody find another use cases for this application, please let me know:)\n\nHow to use?\nFirst of all you need to get JDBC driver for the target database.\nThen launch pq2jdbc like this\n\n   java -cp pq2jdbc.jar:postgresql-42.1.4.jar ru.postgrespro.pq2jdbc.Main -v -t\n\nSupported options are:\n\t-v\t    verbose mode\n\t-t\t  \ttranslate Postgres specific commands\n\t-p PORT\tserver port (default: 5432)\n\t-c URL  JDBC URL (default: \"postgresql:\")\n\t-d URL  JDBC driver (default: \"org.postgresql.Driver\")\n\n\n-t option makes pq2jdbc to translated PostgreSQL specific commands (transactio control, cursor manipulation,...) to standard SQL commands.\nIn verbose mode pq2jdbc display all executed commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostgrespro%2Fpq2jdbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostgrespro%2Fpq2jdbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostgrespro%2Fpq2jdbc/lists"}