According to the PostgREST v7.0.0 docs, the GET
method should only work on RPC functions which are declared with STABLE
or IMMUTABLE
.
However I find that GET
s to a function declared VOLATILE PARALLEL UNSAFE
seems to work just fine.
Anyone know why?
This was corrected on the latest docs: https://postgrest.org/en/latest/api.html#immutable-and-stable-functions
Basically, a VOLATILE function can be called with GET. However, it cannot modify the database because it will be executed on a read-only transaction(INSERT/UPDATE/DELETE will fail).