Overview
PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development. Zequel provides full support for PostgreSQL through the officialpg driver (v8.13.1).
Supported Versions
- PostgreSQL 10+
- PostgreSQL 11+
- PostgreSQL 12+
- PostgreSQL 13+
- PostgreSQL 14+
- PostgreSQL 15+
- PostgreSQL 16+
Connection
Basic Connection
Connection String Formats
PostgreSQL accepts standard connection URLs:SSL/TLS Configuration
Zequel supports all PostgreSQL SSL modes:- Disable: No SSL encryption
- Prefer: Try SSL first, fallback to non-SSL
- Require: Require SSL (don’t verify certificates)
- Verify-CA: Require SSL and verify certificate authority
- Verify-Full: Require SSL and verify certificate authority and hostname
Features
Schemas
- Create, browse, and switch between schemas
- Default schema:
public - System schemas:
pg_catalog,information_schema
Tables & Views
- Tables: Full DDL support with CREATE, ALTER, DROP
- Views: Create and manage standard views
- Materialized Views: Create, refresh, and drop materialized views
- Table Comments: Add descriptions to tables and columns
Data Types
Zequel supports all PostgreSQL data types:- Numeric
- String
- Date/Time
- Other
- SMALLINT, INTEGER, BIGINT
- DECIMAL, NUMERIC (with precision/scale)
- REAL, DOUBLE PRECISION
- SERIAL, BIGSERIAL
Indexes
- B-tree (default)
- Hash
- GiST (Generalized Search Tree)
- GIN (Generalized Inverted Index)
- BRIN (Block Range Index)
- Unique and multi-column indexes
- Partial indexes with WHERE clauses
Constraints
- Primary keys (single and composite)
- Foreign keys with ON UPDATE/ON DELETE actions
- Unique constraints
- Check constraints
- NOT NULL constraints
Sequences
- Create and manage sequences
- Auto-increment columns using SERIAL/BIGSERIAL
- Custom sequence definitions with START, INCREMENT, MINVALUE, MAXVALUE
- CYCLE and CACHE options
Extensions
Manage PostgreSQL extensions:Stored Procedures & Functions
- View and execute functions and procedures
- Support for PL/pgSQL, SQL, and other languages
- Parameter modes: IN, OUT, INOUT
- Return types including SETOF and TABLE
Triggers
- BEFORE and AFTER triggers
- FOR EACH ROW and FOR EACH STATEMENT
- Trigger events: INSERT, UPDATE, DELETE, TRUNCATE
Users & Roles
- Create and manage database users
- Role attributes: SUPERUSER, CREATEDB, CREATEROLE, LOGIN
- Password management
- Connection limits and expiration dates
Enum Types
View and manage custom enum types:Advanced Features
Transactions
Full ACID transaction support:Query Streaming
Zequel uses server-side cursors for large result sets, preventing memory issues when querying millions of rows.Query Cancellation
Active queries can be cancelled usingpg_cancel_backend().
Limitations
Docker Development
Zequel includes a Docker Compose configuration with PostgreSQL:- Tables with various data types
- Views and materialized views
- Functions and procedures
- Triggers and sequences
- Foreign key relationships
- Extensions (uuid-ossp, pg_trgm)
Best Practices
- Use schemas to organize related tables
- Enable SSL for production connections
- Use connection pooling for better performance (handled automatically)
- Set appropriate timeouts for long-running queries
- Use EXPLAIN ANALYZE to optimize query performance