Skip to content
Connectivity

PostgreSQL Wire Protocol

Native compatibility with PostgreSQL tools, clients, and drivers. No code changes required.

CrateDB is fully compatible with the PostgreSQL Wire Protocol, allowing you to connect to it using any PostgreSQL-compatible tool, driver, or client library.

This compatibility makes CrateDB instantly accessible to developers and data teams who already work with PostgreSQL, enabling smooth integration into existing analytics stacks, applications, and pipelines without rewriting code or reconfiguring tools.

CrateDB-PostgreSQL

How It works

The PostgreSQL Wire Protocol defines how a database server and a client communicate, exchanging SQL commands, authentication requests, and query results.

CrateDB implements this protocol natively, meaning any PostgreSQL client can connect to CrateDB just as it would to a PostgreSQL database.

You can use:

  • PostgreSQL clients: psql, pgAdmin, DBeaver, DataGrip, etc.
  • BI and visualization tools: Grafana, Superset, Tableau, Metabase.
  • Programming libraries: PostgreSQL drivers for Python (psycopg2), Java (JDBC), Node.js (pg), Go, and more.
Simply point your existing connection to CrateDB’s host and port, it just works.
cr-quote-image

Key benefits

  • Seamless integration: CrateDB drops into your PostgreSQL ecosystem effortlessly. Reuse existing connectors, libraries, and tools without modifying your applications or SQL queries.
  • Familiar SQL experience: Because CrateDB supports native SQL (including joins, aggregations, CTEs, and subqueries), you can use familiar syntax and workflows with no learning curve.
  • Real-time analytics with PostgreSQL ecosystem: Combine the familiarity of PostgreSQL tools with CrateDB’s distributed SQL engine for high-performance analytics on large-scale, real-time data.
  • Broad compatibility: Connect from any platform or programming language using standard PostgreSQL connection strings, authentication, and SSL encryption.
cr-quote-image

Example connection

Example (using psql):
psql -h <cratedb-host> -p 5432 -U <username> -d <database>

Example (using JDBC):
jdbc:postgresql://<cratedb-host>:5432/<database>

No special driver or plugin is required: the PostgreSQL Wire Protocol ensures compatibility out of the box.
cr-quote-image

When to use the PostgreSQL Wire Protocol

  • Integrating CrateDB with existing PostgreSQL-based tools (BI dashboards, data pipelines, monitoring systems).
  • Developing applications that need a standard SQL interface with minimal integration overhead.
  • Migrating workloads from PostgreSQL to a distributed, real-time database without rewriting application logic.
For lightweight or web-based integrations, CrateDB also offers an HTTP Endpoint.
cr-quote-image

Why it matters

  • Zero friction: Plug CrateDB into your PostgreSQL workflows immediately.
  • Ecosystem ready: Use thousands of existing PostgreSQL-compatible libraries and connectors.
  • Enterprise-grade: Combine familiar SQL access with CrateDB’s distributed scalability and resilience.
  • Future-proof: Build on open standards, not proprietary connectors.
cr-quote-image

CrateDB architecture guide

This comprehensive guide covers all the key concepts you need to know about CrateDB's architecture. It will help you gain a deeper understanding of what makes it performant, scalable, flexible and easy to use. Armed with this knowledge, you will be better equipped to make informed decisions about when to leverage CrateDB for your data projects. 

CrateDB-Architecture-Guide-Cover

Additional resources

Want to learn more?