awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
lib avatar

lib/pq

0
View on GitHub↗
9,903 星标·956 分支·Go·MIT·3 次浏览pkg.go.dev/github.com/lib/pq↗

Pq

pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection library and protocol implementation that translates application data types into the binary and text formats required by PostgreSQL.

The project provides specialized utilities for high-performance data ingestion using bulk data loading and a dedicated bulk data importer. It also features an implementation for listening to asynchronous server notifications and provides tools for connection load balancing across multiple hosts and ports.

The driver covers a broad surface of database interaction, including parameterized query execution, prepared statements, and type mapping for arrays and timezones. Security is handled through SSL/TLS encryption, GSSAPI authentication, and utilities for escaping SQL identifiers and literals to prevent injection. Additional capabilities include detailed diagnostic error handling and raw protocol communication debugging.

Features

  • PostgreSQL Connectors - Implements a specialized Go driver for establishing and managing secure connections to PostgreSQL databases.
  • SQL Database Connectivity - Implements the standard Go database/sql interface to provide seamless connectivity between Go applications and PostgreSQL.
  • Connection Establishment - Manages the multi-step authentication and parameter exchange sequence required to establish a secure database session.
  • Data Type Mappings - Translates database-specific OIDs and binary formats into native Go types during result set decoding.
  • Database Connectivity - Enables the establishment of database connections using structured configurations, URLs, and connection strings.
  • Database Drivers - Implements the standard database/sql interface to enable Go applications to interact with PostgreSQL.
  • SQL Query Execution - Sends SQL statements to the PostgreSQL server and retrieves the resulting rows for application processing.
  • Binary Protocol Implementations - Provides a full implementation of the PostgreSQL binary wire protocol for efficient client-server communication.
  • Prepared Statements - Implements prepared statements to improve execution performance and security through pre-compiled query templates.
  • Query Parameterization - Supports running SQL statements with markers to pass variables safely and prevent injection attacks.
  • Query Result Fetching - Fetches rows from a query sequentially and decodes the raw data into compatible native types.
  • Database Authentication - Implements mechanisms for validating user credentials and security tokens to authorize access to PostgreSQL instances.
  • Bulk Data Ingestion - Provides high-performance utilities for streaming large datasets directly into tables via specialized bulk ingestion channels.
  • PostgreSQL Bulk Importers - Provides a dedicated utility for high-performance data ingestion using PostgreSQL binary and copy protocols.
  • Bulk Data Loading - Ships high-performance bulk loading capabilities to stream multiple rows into tables with minimal overhead.
  • Encrypted Connections - Establishes encrypted connections to PostgreSQL using various SSL modes and GSSAPI authentication.
  • Database Error Handling - Parses PostgreSQL server error codes and diagnostic messages to enable programmatic recovery and debugging.
  • SQL Literal Escaping - Wraps string values in single quotes and escapes special characters for safe embedding in SQL statements.
  • Load Balancing - Implements algorithms to distribute connection attempts across multiple hosts and ports to ensure availability.
  • Ticket-Based Authentication - Supports GSSAPI integration to handle ticket-based authentication for secure database connections.
  • Connection Encryption Modes - Enables encrypted connections using various SSL modes to verify server certificates and hostnames.
  • Identifier Escaping - Provides utilities to escape database identifiers, wrapping them in quotes to ensure they are treated as literal names.
  • TLS/SSL Configurations - Handles the negotiation of encryption levels and SSL/TLS configurations to secure data transit between the application and server.
  • SQL Injection Prevention - Prevents SQL injection by using parameterized queries and escaping identifiers and literals.
  • Database Notification Listeners - Implements listeners that trigger application events based on asynchronous notifications sent from the PostgreSQL server.
  • Database Drivers - Pure Go PostgreSQL driver.
  • Database Tools - PostgreSQL driver for Go.
  • Database Drivers - Go database driver.

Star 历史

lib/pq 的 Star 历史图表lib/pq 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Pq 的开源替代方案

相似的开源项目,按与 Pq 的功能重合度排序。
  • brianc/node-postgresbrianc 的头像

    brianc/node-postgres

    13,155在 GitHub 上查看↗

    This project is a Node.js client for PostgreSQL databases, providing a protocol parser to translate raw binary streams into JavaScript objects. It serves as a driver for executing queries, managing data, and integrating Node.js applications with PostgreSQL backends. The library includes a connection pool manager to reduce network overhead by caching reusable connections and a result streamer that uses cursors to retrieve large datasets incrementally. It also functions as an event listener for subscribing to asynchronous server-side notifications to trigger real-time application events. Broad

    JavaScriptlibpqnode-postgrespostgres
    在 GitHub 上查看↗13,155
  • datlechin/tableprodatlechin 的头像

    datlechin/TablePro

    4,471在 GitHub 上查看↗

    TablePro is a cross-platform database management client designed for browsing, querying, and administering both SQL and NoSQL databases. It functions as a unified workspace that integrates a code-centric SQL editor with schema visualization tools, allowing developers to manage complex data models and execute queries across diverse database engines. The application distinguishes itself through an agentic AI integration layer that connects language models directly to database tools, enabling automated query generation, optimization, and error fixing with configurable approval gates. It features

    Swift
    在 GitHub 上查看↗4,471
  • jmoiron/sqlxjmoiron 的头像

    jmoiron/sqlx

    17,651在 GitHub 上查看↗

    sqlx is a set of extensions for the Go database/sql package that reduces boilerplate code by automating the mapping of database query results directly into structs and slices. It provides a wrapper around standard database types to eliminate manual row scanning and repetitive error handling. The project distinguishes itself through named parameter binding and query placeholder rebinding, which translate generic markers into driver-specific symbols. It also enables dynamic SQL execution by allowing the application to read and execute SQL statements directly from the filesystem. The library co

    Go
    在 GitHub 上查看↗17,651
  • doctrine/dbaldoctrine 的头像

    doctrine/dbal

    9,699在 GitHub 上查看↗

    This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa. The library enables programmatic schema management through a schema manager that can introspect database metadata, model structures as objects, and generate the SQL required to migrate between

    PHPdatabaseibm-db2mariadb
    在 GitHub 上查看↗9,699
查看 Pq 的所有 30 个替代方案→

常见问题解答

lib/pq 是做什么的?

pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection library and protocol implementation that translates application data types into the binary and text formats required by PostgreSQL.

lib/pq 的主要功能有哪些?

lib/pq 的主要功能包括:PostgreSQL Connectors, SQL Database Connectivity, Connection Establishment, Data Type Mappings, Database Connectivity, Database Drivers, SQL Query Execution, Binary Protocol Implementations。

lib/pq 有哪些开源替代品?

lib/pq 的开源替代品包括: brianc/node-postgres — This project is a Node.js client for PostgreSQL databases, providing a protocol parser to translate raw binary streams… datlechin/tablepro — TablePro is a cross-platform database management client designed for browsing, querying, and administering both SQL… jmoiron/sqlx — sqlx is a set of extensions for the Go database/sql package that reduces boilerplate code by automating the mapping of… doctrine/dbal — This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting… mysqljs/mysql — This project is a MySQL database driver and client for Node.js. It provides a JavaScript implementation of the MySQL… magicstack/asyncpg — asyncpg is an asynchronous database driver and binary protocol client for PostgreSQL. It provides a non-blocking…