news.volyx.in

PostgREST (postgrest.org)

771 points by deepersprout · 2538 days ago · 237 comments on HN

Article summary

PostgREST is a standalone web server that turns a PostgreSQL database into a RESTful API, using the database's structural constraints and permissions to determine API endpoints and operations. This approach aims to eliminate manual CRUD programming and object-relational mapping, instead establishing the database as the single source of truth. The project has a growing ecosystem and community, with several companies using it in production. PostgREST follows a focused development philosophy, with a two-part versioning system and a deprecation policy to ensure stability and maintainability.

Main themes

  • PostgREST
  • RESTful API
  • PostgreSQL
  • Database-as-API
  • CRUD programming
  • Object-relational mapping

What commenters say

  • The project's production usage and community support are notable, despite its relatively low profile on Hacker News.
  • Some users find the Haskell codebase difficult to read and maintain, while others argue that it is manageable with some knowledge of the language.
  • PostgREST's approach to API development is seen as a solution to the problems of manual CRUD programming and object-relational mapping, but others argue that it may not be suitable for all use cases.
  • The project's focus on database-centric development and SQL programming is seen as a strength, but may require additional skills and knowledge for effective use.
  • There are equivalent projects for other databases, such as MySQL, but they may not offer the same level of access rights management as PostgREST.
  • Some users disagree with the idea of using a single schema definition for API development, arguing that different parts of the stack have different use cases and require different data representations.
  • Others argue that PostgREST and similar projects, such as GraphQL, allow for a more flexible and client-centric approach to API development, while still maintaining a strong connection to the underlying database schema.