Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ADBC PostgreSQL Driver

Vendor: PostgreSQL Implementation: C/C++ Status: Stable

conda-forge: adbc-driver-postgresql conda-forge: libadbc-driver-postgresql CRAN: adbcpostgresql PyPI: adbc-driver-postgresql

This implements an ADBC driver that wraps libpq, the client library for PostgreSQL.

This project owes credit to 0x0L's pgeon for the overall approach.

NOTE: this project is not affiliated with PostgreSQL in any way.

Building

Dependencies: libpq itself. This can be installed with your favorite package manager; however, you may need to set the PKG_CONFIG_PATH environment variable such that pkg-config can find libpq.

See CONTRIBUTING.md for details.

Testing

A running instance of PostgreSQL is required. For example, using Docker:

$ docker run -it --rm \
    -e POSTGRES_PASSWORD=password \
    -e POSTGRES_DB=tempdb \
    -p 5432:5432 \
    postgres

Alternatively use the docker compose provided by ADBC to manage the test database container.

$ docker compose up postgres-test
# When finished:
# docker compose down postgres-test

Then, to run the tests, set the environment variable specifying the PostgreSQL URI before running tests:

$ export ADBC_POSTGRESQL_TEST_URI=postgresql://localhost:5432/postgres?user=postgres&password=password
$ ctest

Users of VSCode can use the CMake extension with the supplied CMakeUserPresets.json example to supply the required CMake and environment variables required to build and run tests.