/plushcap/analysis/hasura/the-pros-and-cons-of-updatable-views

The pros and cons of updatable views in PostgreSQL

What's this blog post about?

The text discusses the pros and cons of updatable views in PostgreSQL. Updatable views are a feature that allows users to insert or update data through a view instead of directly on the table. They were used by Hasura, an open-source engine that sits on top of Postgres, to enforce permissions for non-admin users. However, updatable views have certain limitations such as not having default column values and not supporting ON CONFLICT clauses. To address these issues, Hasura moved away from using updatable views and instead used a simpler approach involving insert CTEs and a helper function to check permissions.

Company
Hasura

Date published
Jan. 31, 2020

Author(s)
Phil Freeman

Word count
1524

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.