July 25th, 2024

PostgREST – Serve a RESTful API from Any Postgres Database

PostgREST creates RESTful APIs from PostgreSQL databases, offering high performance, security via JWT, multiple API versions, self-documentation with OpenAPI, and community support for contributions and sponsorships.

Read original articleLink Icon
PostgREST – Serve a RESTful API from Any Postgres Database

PostgREST is a tool that creates a fully RESTful API from existing PostgreSQL databases, offering a more efficient and standards-compliant alternative to custom API development. It achieves impressive performance, with subsecond response times for up to 2000 requests per second, particularly on Heroku's free tier, thanks to its Haskell foundation and optimized database interactions. Key features include security through JSON Web Tokens (JWT) for authentication, with authorization managed by database role information. It supports multiple API versions via database schemas, ensuring flexibility in table and view exposure. PostgREST also provides self-documentation using the OpenAPI standard, allowing for interactive API documentation through tools like Swagger-UI. Data integrity is maintained through declarative constraints in the database, preventing data corruption. To get started, users can download the appropriate binary from the latest release and access usage instructions via the help command. For more comprehensive information, the official documentation is available online. The project encourages community support through platforms like Patreon and welcomes contributions, with a list of sponsors and backers accessible on its GitHub page.

Related

Supabase (YC S20) Is Hiring Postgres SREs

Supabase (YC S20) Is Hiring Postgres SREs

Supabase seeks a Site Reliability Engineer to manage Postgres databases remotely. Responsibilities include enhancing reliability, ensuring high availability, and optimizing performance. Ideal candidates possess multi-tenant database experience, Postgres tools proficiency, and AWS deployment skills. Benefits include remote work, equity, health coverage, and tech allowance.

Psycopg 3.2 released – PostgreSQL driver for Python

Psycopg 3.2 released – PostgreSQL driver for Python

Psycopg 3.2 release brings Numpy scalar and PostgreSQL parameter format support, async enhancements, and PgBouncer interaction. It emphasizes maintaining crucial Python-PostgreSQL communication, aiding businesses and infrastructures with reliable interaction.

Just Use Postgres for Everything

Just Use Postgres for Everything

The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.

Mongo but on Postgres and with strong consistency benefits

Mongo but on Postgres and with strong consistency benefits

The Pongo project on GitHub offers a tool for utilizing MongoDB-like syntax on Postgres with strong consistency benefits. It supports data operations in Postgres and provides a MongoDB-compatible shim. Visit the GitHub repository for details.

Just Use Postgres for Everything

Just Use Postgres for Everything

The blog post advocates for using PostgreSQL extensively in tech stacks to simplify development, improve productivity, and reduce complexity. It highlights benefits like scalability, efficiency, and cost-effectiveness, promoting a consolidated approach.

Link Icon 4 comments
By @ijustlovemath - 4 months
We've been using this quite effectively for building some internal simulation tooling; being able to create a view/stored procedure and instantly having an endpoint for it is pretty magical, and has let us focus more on the product and less on the database. The filtering capabilities in the URL parameters are pretty nice as well!
By @metadat - 4 months
Discussed previously:

https://news.ycombinator.com/item?id=25159097 - Nov 2020 (205 comments)

By @anonymouse008 - 4 months
How much should one trust RLS? Reading PostgREST, it looks like you could use a JWT parameter to enforce a policy - whether individual user or group based.

I really love the idea of RLS, but wonder at it's provable security properties.