Doltgres SQL Server Postgres Client Support

DOLTGRESINTEGRATION
2 min read

Doltgres is a version-controlled, PostgreSQL-compatible database. This means any standard Postgres client should connect to the Doltgres server. Today’s blog shares an update on how far we are to support the standard Postgres SQL clients.

We recently added tests to track which clients are currently supported. These automated tests run on every GitHub pull request we make, allowing us to maintain the compatibility of the Doltgres SQL server. We use the same approach as Dolt's MySQL client tests for Doltgres. More details on the test design and walk-through on how to write a client test guide can be found in this blog.

Coverage

Currently, we test using simple queries like SELECT from a table, INSERT into a table and some of the version control features, which are stored procedures like DOLT_ADD, DOLT_COMMIT, etc. Here are the list of common queries we test for each Postgres client.

create table test (pk int, value int, d1 decimal(9, 3), f1 float, c1 char(10), t1 text, primary key(pk));
select * from test;
insert into test (pk, value, d1, f1, c1, t1) values (0,0,0.0,0.0,'abc','a1');
select * from test;
call dolt_add('-A');;
call dolt_commit('-m', 'my commit');
select COUNT(*) FROM dolt_log;
call dolt_checkout('-b', 'mybranch');
insert into test (pk, value, d1, f1, c1, t1) values (10,10, 123456.789, 420.42,'example','some text');
call dolt_commit('-a', '-m', 'my commit2');
call dolt_checkout('main');
call dolt_merge('mybranch');
select COUNT(*) FROM dolt_log;

Here is a table showing which clients are tested with queries defined above.

Postgres Client Language Tested
Postgres ligpg C
Postgres JDBC Java
Node Node
DBD::Pg Perl
pgsql PHP
Ruby Ruby

Most SQL clients use similar steps to connect to SQL servers. An example is queries on system tables to get necessary information to use to verify and display data. Currently, we are working on implementing pg_catalog, which is crucial to supporting many of clients like SQL editors, frameworks and ORMs.

Which Postgres client are not supported yet?

Here is a table with clients that are neither tested nor supported yet.

  • C++ / libpg++
  • .NET / Npgsql
  • Elixir / Ecto
  • Python / SQLAlchemy
  • R
  • Rust

Want to contribute?

The postgres client tests can be found in this GitHub repository.

If you already use a Postgres client, you can simply use the same setup with few configuration changes to connect to a Doltgres server. Try it out Doltgres! If it does not connect or fails to run any query, let us know. We can be found on our Discord channel or file an issue on GitHub. We will be happy to get it working for you, or we can help you navigate with any contribution to the postgres client tests.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.