# postgrest/postgrest

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/postgrest-postgrest).**

27,232 stars · 1,204 forks · Haskell · MIT

## Links

- GitHub: https://github.com/PostgREST/postgrest
- Homepage: https://postgrest.org
- awesome-repositories: https://awesome-repositories.com/repository/postgrest-postgrest.md

## Topics

`api` `automatic-api` `database` `haskell` `http` `pg` `pgsql` `postgres` `postgresql` `postgrest` `rest` `server` `sql`

## Description

PostgREST is a standalone server process that automatically transforms a relational database schema into a fully functional RESTful API. By querying system catalogs at startup, it maps tables, views, and stored procedures into standardized web endpoints, allowing developers to build backend services by focusing exclusively on database design.

The service functions as a declarative engine that translates HTTP requests and query parameters directly into native SQL operations. It maintains stateless request processing and integrates connection pooling to manage high-frequency interactions efficiently. Security is enforced by delegating authentication and authorization to the database engine, which maps request tokens to specific database roles and applies row-level security policies to ensure consistent data access.

This approach enables rapid prototyping by eliminating the need for custom application code to handle standard data operations. The system acts as a relational data gateway, ensuring that all interactions adhere to the integrity constraints and permissions defined within the underlying database.

## Tags

### Data & Databases

- [Database Middleware](https://awesome-repositories.com/f/data-databases/database-middleware.md) — Exposes database operations directly through standard HTTP requests while maintaining strict relational integrity.
- [Database-to-REST Interfaces](https://awesome-repositories.com/f/data-databases/database-to-rest-interfaces.md) — Automatically exposes database tables as functional RESTful API endpoints with integrated permission management.
- [HTTP-to-SQL Mappers](https://awesome-repositories.com/f/data-databases/http-to-sql-mappers.md) — Translates standard REST verbs and headers directly into corresponding SQL operations to provide a seamless interface for database interactions.
- [API Generators](https://awesome-repositories.com/f/data-databases/api-generators.md) — Automatically generates secure RESTful API endpoints by introspecting database schemas and structural constraints. ([source](http://postgrest.org))
- [Connection Pooling Middleware](https://awesome-repositories.com/f/data-databases/connection-pooling-middleware.md) — Maintains a persistent set of database connections to minimize latency and overhead when executing high-frequency API requests.
- [Connection Pools](https://awesome-repositories.com/f/data-databases/connection-pools.md) — Manages a persistent set of database connections to minimize latency and overhead when executing high-frequency API requests.
- [Data Gateways](https://awesome-repositories.com/f/data-databases/data-gateways.md) — Exposes structured database content as queryable resources through standard web protocols.
- [Database-First Development Frameworks](https://awesome-repositories.com/f/data-databases/database-first-development-frameworks.md) — Automates backend API construction by deriving structure and endpoints directly from database schema definitions.
- [Database Query Translators](https://awesome-repositories.com/f/data-databases/database-query-translators.md) — Automatically parses web requests and query parameters into native SQL statements for direct database execution.
- [Database Schema Introspection Tools](https://awesome-repositories.com/f/data-databases/database-schema-introspection-tools.md) — Automatically maps database tables and procedures into a RESTful API structure by querying system catalogs at startup.
- [Query Translators](https://awesome-repositories.com/f/data-databases/query-translators.md) — Converts complex HTTP request parameters and filters into native SQL queries using a recursive parser for efficient database execution.
- [Rapid Prototyping Tools](https://awesome-repositories.com/f/data-databases/rapid-prototyping-tools.md) — Generates functional backend services and APIs automatically from database schema definitions to eliminate boilerplate code.

### Security & Cryptography

- [Access Control Layers](https://awesome-repositories.com/f/security-cryptography/access-control-layers.md) — Enforces row-level security and database permissions directly at the API level to ensure users only access authorized data.
- [Access Control Systems](https://awesome-repositories.com/f/security-cryptography/access-control-systems.md) — Enforces security by mapping request tokens to database roles and executing queries within restricted security contexts.

### Web Development

- [API Generators](https://awesome-repositories.com/f/web-development/api-generators.md) — Automatically maps database tables and views into RESTful endpoints by querying system catalogs to derive structure at startup.

### Software Engineering & Architecture

- [Stateless Architectures](https://awesome-repositories.com/f/software-engineering-architecture/stateless-architectures.md) — Implements stateless request processing by authenticating and authorizing each request independently without server-side session state.

### Part of an Awesome List

- [API Generation](https://awesome-repositories.com/f/awesome-lists/data/api-generation.md) — Provides a RESTful API for any PostgreSQL database.
- [Data and Databases](https://awesome-repositories.com/f/awesome-lists/data/data-and-databases.md) — REST API generation for PostgreSQL databases.
- [Data Utilities](https://awesome-repositories.com/f/awesome-lists/data/data-utilities.md) — RESTful API server for PostgreSQL.
