SQL Clients#
Doltgres ships with a built-in Postgres compatible server. To start the server for your Doltgres
database, you run doltgres. The doltgres command starts a Postgres compatible server
on port 5432. By default, a user named postgres with a password of password is created, along
with the postgres database.
Once a server is running, any Postgres client should be able to connect to Doltgres SQL Server in
the exact same way it connects to a standard Postgres database. For instance, if you are running a
Doltgres sql-server locally, you can connect to it with the psql client like so:
PGPASSWORD=password psql -h 127.0.0.1 -U postgres
psql (16.1 (Ubuntu 16.1-1.pgdg20.04+1), server 15.0)
Type "help" for help.
postgres=>
We explicitly support the programmatic clients outlined in this document through integration testing. Tests are run on GitHub pull requests to Doltgres in a Ubuntu environment in a Docker container. If you would like another Postgres compatible client supported and tested, please let us know.
The test code linked to below is a good way to get started connecting to a Doltgres SQL server if you are not familiar how to connect to Postgres in your language of choice. The code establishes a connection, runs some simple queries, verifies the output comes back as expected, and closes the connection.
Supported clients#
The following clients are tested and known to work with Doltgres. Other clients will also probably work, but aren’t yet tested by our integration test suite. If you discover the client or library you need doesn’t work, please let us know by filing an issue.
Java#
pgJDBC#
R2DBC PostgreSQL#
Node#
node-postgres (pg)#
Knex.js#
Drizzle ORM#
Python#
psycopg2#
SQLAlchemy#
Go#
pgx#
lib/pq#
C#
libpq#
libaprutil (apr_dbd)#
libdbi#
C++#
libpqxx#
ODBC#
psqlODBC#
Perl#
DBD::Pg#
Ruby#
pg#
Sequel#
ActiveRecord#
PHP#
pgsql (pg_connect)#
PDO_PGSQL#
R#
RPostgres#
RPostgreSQL#
Rust#
sqlx#
Dotnet#
Npgsql#
Elixir#
Postgrex#
Note: the Postgrex test is currently disabled in CI due to a known issue.