Added
- #1933, #2109, Add a minimal health check endpoint - @steve-chavez
- For enabling this, the
admin-server-port
config must be set explictly - A
<host>:<admin_server_port>/live
endpoint is available for checking if postgrest is running on its port/socket. 200 OK = alive, 503 = dead. - A
<host>:<admin_server_port>/ready
endpoint is available for checking a correct internal state(the database connection plus the schema cache). 200 OK = ready, 503 = not ready.
- For enabling this, the
- #1988, Add the current user to the request log on stdout - @DavidLindbom, @wolfgangwalther
- #1823, Add the ability to run postgrest without any configuration. - @wolfgangwalther
- #1991, Add the ability to run without
db-uri
using libpq's PG environment variables to connect. - @wolfgangwalther - #1769, Add the ability to run without
db-schemas
, defaulting todb-schemas=public
. - @wolfgangwalther - #1689, Add the ability to run without
db-anon-role
disabling anonymous access. - @wolfgangwalther
- #1991, Add the ability to run without
- #1543, Allow access to fields of composite types in select=, order= and filters through JSON operators -> and ->>. - @wolfgangwalther
- #2075, Allow access to array items in ?select=, ?order= and filters through JSON operators -> and ->>. - @wolfgangwalther
- #2156, #2211, Allow applying
limit/offset
to UPDATE/DELETE to only affect a subset of rows - @steve-chavez- It requires an explicit
order
on a unique column(s)
- It requires an explicit
- #1917, Add error codes with the
"PGRST"
prefix to the error response body to differentiate PostgREST errors from PostgreSQL errors - @laurenceisla - #1917, Normalize the error response body by always having the
detail
andhint
error fields with anull
value if they are empty - @laurenceisla - #2176, Errors raised with
SQLSTATE
now include the message and the code in the response body - @laurenceisla - #2236, Support POSIX regular expression operators for row filtering - @enote-kane
- #2202, Allow returning XML from RPCs - @fjf2002
- #2269, Allow
limit=0
in the request query to return an empty array - @gautam1168, @laurenceisla - #2268, Allow returning XML from single-column queries - @fjf2002
- #2300, RPC POST for function w/single unnamed XML param #2300 - @fjf2002
- #1959, Bulk update with PATCH - @steve-chavez
- #1564, Allow geojson output by specifying the
Accept: application/geo+json
media type - @steve-chavez- Requires postgis >= 3.0
- Works for GET, RPC, POST/PATCH/DELETE with
Prefer: return=representation
. - Resource embedding works and the embedded rows will go into the
properties
key - In case of multiple geometries in the same table, you can choose which one will go into the
geometry
key with the usual?select
query parameter.
- #1082, Add security definitions to the OpenAPI output - @laurenceisla
- #2378, Support http OPTIONS method on RPC and root path - @steve-chavez
- #2354, Allow getting the EXPLAIN plan of a request by using the
Accept: application/vnd.pgrst.plan
header - @steve-chavez- Only allowed if the
db-plan-enabled
config is set to true - Can generate the plan for different media types using the
for
parameter:Accept: application/vnd.pgrst.plan; for="application/vnd.pgrst.object"
- Different options for the plan can be used with the
options
parameter:Accept: application/vnd.pgrst.plan; options=analyze|verbose|settings|buffers|wal
- The plan can be obtained in text or json by using different media type suffixes:
Accept: application/vnd.pgrst.plan+text
andAccept: application/vnd.pgrst.plan+json
. - Limited to generating the plan of a json representation(
application/json
) but can be extended later to allow other representations. - The plan can be obtained in text(
Accept: application/vnd.pgrst.plan+text
) and json(Accept: application/vnd.pgrst.plan+json
orAccept: application/vnd.pgrst.plan
) format.
- Only allowed if the
- #2397, Fix race conditions managing database connection helper - @robx
Fixed
- #2058, Return 204 No Content without Content-Type for PUT - @wolfgangwalther
- #2107, Clarify error for failed schema cache load. - @steve-chavez
- From
Database connection lost. Retrying the connection
toCould not query the database for the schema cache. Retrying.
- From
- #1771, Fix silently ignoring filter on a non-existent embedded resource - @steve-chavez
- #2152, Remove functions, which are uncallable because of unnamend arguments from schema cache and OpenAPI output. - @wolfgangwalther
- #2145, Fix accessing json array fields with -> and ->> in ?select= and ?order=. - @wolfgangwalther
- #2155, Ignore
max-rows
on POST, PATCH, PUT and DELETE - @steve-chavez - #2254, Fix inferring a foreign key column as a primary key column on views - @steve-chavez
- #2070, Restrict generated many-to-many relationships - @steve-chavez
- Only adds many-to-many relationships when: a table has FKs to two other tables and these FK columns are part of the table's PK columns.
- #2278, Allow casting to types with underscores and numbers(e.g.
select=oid_array::_int4
) - @steve-chavez - #2277, #2238, #1643, Prevent views from breaking one-to-many/many-to-one embeds when using column or FK as target - @steve-chavez
- When using a column or FK as target for embedding(
/tbl?select=*,col-or-fk(*)
), only tables are now detected and views are not. - You can still use a column or an inferred FK on a view to embed a table(
/view?select=*,col-or-fk(*)
)
- When using a column or FK as target for embedding(
- #1959, An accidental full table PATCH(without filters) is not possible anymore, it requires filters or a
limit
parameter - @steve-chavez, @laurenceisla - #2317, Increase the
db-pool-timeout
to 1 hour to prevent frequent high connection latency - @steve-chavez - #2341, The search path now correctly identifies schemas with uppercase and special characters in their names (regression) - @laurenceisla
- #2364, "404 Not Found" on nested routes and "405 Method Not Allowed" errors no longer start an empty database transaction - @steve-chavez
- #2342, Fix inaccurate result count when an inner embed was selected after a normal embed in the query string - @laurenceisla
- #2376, OPTIONS requests no longer start an empty database transaction - @steve-chavez
- #2395, Allow using columns with dollar sign($) without double quoting in filters and
select
- @steve-chavez
Changed
- #2001, Return 204 No Content without Content-Type for RPCs returning VOID - @wolfgangwalther
- Previously, those RPCs would return "null" as a body with Content-Type: application/json.
- #2156,
limit/offset
now limits the affected rows on UPDATE/DELETE - @steve-chavez- Previously,
limit/offset
only limited the returned rows but not the actual updated rows
- Previously,
- #2155,
max-rows
is no longer applied on POST/PATCH/PUT/DELETE returned rows - @steve-chavez- This was misleading because the affected rows were not really affected by
max-rows
, only the returned rows were limited
- This was misleading because the affected rows were not really affected by
- #2070, Restrict generated many-to-many relationships - @steve-chavez
- A primary key that contains the foreign key columns is now needed for generating many-to-many relationships.
- #2277, Views now are not detected when embedding using the column or FK as target (
/view?select=*,column(*)
) - @steve-chavez- This embedding form was easily made ambiguous whenever a new view was added.
- For migrating, clients must be updated to the embedding form of
/view?select=*,other_view!column(*)
.
- #1959, A full table PATCH(without filters) is now restricted, it requires a
limit
parameter - @steve-chavez- A
PATCH /tbl
will now result in 0 rows updated, unlessPATCH /tbl?limit=10&order=<pkcol>
is done
- A
- #2312, Using
Prefer: return=representation
no longer returns aLocation
header - @laurenceisla