3 ms·
One of the suggested ways to use PostgREST is that rather than pointing it at the Postgres schema called "public" (where created tables live by default), you po
by frou_dh 8y ago
One of the suggested ways to use PostgREST is that rather than pointing it at the Postgres schema called "public" (where created tables live by default), you point it at a schema consisting of nothing but SQL Views which communicate with those tables. That way, the underlying table structure can be altered without affecting the clients that consume the auto-generated HTTP interface.
It's more effort to have to maintain some extra SQL code for those views, but with all the labour-saving PostgREST delivers in the first place, you still come out ahead.
- duncan-donuts 8y agoBut if you’re going to do all that why not just put an abstraction in code (that could actually have some automated tests)?
- michelpp 8y agoThere are test frameworks for postgres. https://pgtap.org/ https://pgtap.org/