Postgrest Versions Save

REST API for any Postgres database

v10.1.0

1 year ago

Added

  • #2348, Add db-pool-acquisition-timeout configuration option, time in seconds to wait to acquire a connection. - @robx

Fixed

  • #2261, #2349, #2467, Reduce allocations communication with PostgreSQL, particularly for request bodies. - @robx
  • #2401, #2444, Fix SIGUSR1 to fully flush connections pool. - @robx
  • #2428, Fix opening an empty transaction on failed resource embedding - @steve-chavez
  • #2455, Fix embedding the same table multiple times - @steve-chavez
  • #2518, Fix a regression when embedding views where base tables have a different column order for FK columns - @wolfgangwalther
  • #2458, Fix a regression with the location header when inserting into views with PKs from multiple tables - @wolfgangwalther
  • #2356, Fix a regression in openapi output with mode follow-privileges - @wolfgangwalther
  • #2283, Fix infinite recursion when loading schema cache with self-referencing view - @wolfgangwalther
  • #2343, Return status code 200 for PATCH requests which don't affect any rows - @wolfgangwalther
  • #2481, Treat computed relationships not marked SETOF as M2O/O2O relationship - @wolfgangwalther
  • #2534, Fix embedding a computed relationship with a normal relationship - @steve-chavez
  • #2362, Fix error message when [] is used inside select - @wolfgangwalther
  • #2475, Disallow !inner on computed columns - @wolfgangwalther
  • #2285, Ignore leading and trailing spaces in column names when parsing the query string - @wolfgangwalther
  • #2545, Fix UPSERT with PostgreSQL 15 - @wolfgangwalther
  • #2459, Fix embedding views with multiple references to the same base column - @wolfgangwalther

Changed

  • #2444, Removed db-pool-timeout option, because this was removed upstream in hasql-pool. - @robx
  • #2343, PATCH requests that don't affect any rows no longer return 404 - @wolfgangwalther
  • #2537, Stricter parsing of query string. Instead of silently ignoring, the parser now throws on invalid syntax like json paths for embeddings, hints for regular columns, empty casts or fts languages, etc. - @wolfgangwalther

Deprecated

  • #1385, Deprecate bulk-calls when including the Prefer: params=multiple-objects in the request. A function with a JSON array or object parameter should be used instead for a better performance.

v10.0.0.20221011

1 year ago

Added

  • #2348, Add db-pool-acquisition-timeout configuration option, time in seconds to wait to acquire a connection. - @robx

Fixed

  • #2401, #2444, Fix SIGUSR1 to fully flush connections pool, remove db-pool-timeout. - @robx
  • #2428, Fix opening an empty transaction on failed resource embedding - @steve-chavez
  • #2261, #2349, #2467, Reduce allocations communication with PostgreSQL, particularly for request bodies. - @robx

Deprecated

  • #1385, Deprecate bulk-calls when including the Prefer: params=multiple-objects in the request. A function with a JSON array or object parameter should be used instead for a better performance.

v10.0.0

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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
  • #2268, Allow returning XML from single-column queries - @fjf2002
  • #2300, RPC POST for function w/single unnamed XML param #2300 - @fjf2002
  • #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 and Accept: application/vnd.pgrst.plan+json.
  • #2144, Support computed relationships which allow extending and overriding relationships for resource embedding - @steve-chavez, @wolfgangwalther
  • #1984, Detect one-to-one relationships for resource embedding - @steve-chavez
    • Detected when there's a foreign key with a unique constraint or when a foreign key is also a primary key

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 to Could not query the database for the schema cache. Retrying.
  • #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(*))
  • #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
  • #2410, Fix loop crash error on startup in Postgres 15 beta 3. Log: "UNION types "char" and text cannot be matched". - @yevon
  • #2397, Fix race conditions managing database connection helper - @robx
  • #2269, Allow limit=0 in the request query to return an empty array - @gautam1168, @laurenceisla

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
  • #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
  • #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.
    • You can use computed relationships to keep this embedding form working
  • #2312, Using Prefer: return=representation no longer returns a Location header - @laurenceisla
  • #1984, For the cases where one to one relationships are detected, json objects will be returned instead of json arrays of length 1
    • If you wish to override this behavior, you can use computed relationships to return arrays again

v9.0.1.20220802

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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 and Accept: 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 or Accept: application/vnd.pgrst.plan) format.
  • #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 to Could not query the database for the schema cache. Retrying.
  • #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(*))
  • #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
  • #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
  • #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, unless PATCH /tbl?limit=10&order=<pkcol> is done
  • #2312, Using Prefer: return=representation no longer returns a Location header - @laurenceisla

v9.0.1.20220717

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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

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 to Could not query the database for the schema cache. Retrying.
  • #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(*))
  • #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

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
  • #2156, using PATCH/DELETE with limit/offset throws an error on views - @steve-chavez
  • #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
  • #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, unless PATCH /tbl?limit=10&order=<pkcol> is done
  • #2312, Using Prefer: return=representation no longer returns a Location header - @laurenceisla

v9.0.1.20220714

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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

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 to Could not query the database for the schema cache. Retrying.
  • #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(*))
  • #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

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
  • #2156, using PATCH/DELETE with limit/offset throws an error on views - @steve-chavez
  • #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
  • #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, unless PATCH /tbl?limit=10&order=<pkcol> is done
  • #2312, Using Prefer: return=representation no longer returns a Location header - @laurenceisla

v9.0.1.20220630

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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.

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 to Could not query the database for the schema cache. Retrying.
  • #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(*))
  • #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

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
  • #2156, using PATCH/DELETE with limit/offset throws an error on views - @steve-chavez
  • #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
  • #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, unless PATCH /tbl?limit=10&order=<pkcol> is done
  • #2312, Using Prefer: return=representation no longer returns a Location header - @laurenceisla

v9.0.1

1 year ago

Fixed

  • #2165, Fix json/jsonb columns should not have type in OpenAPI spec - @clrnd
  • #2020, Execute deferred constraint triggers when using Prefer: tx=rollback - @wolfgangwalther
  • #2077, Fix is not working with upper or mixed case values like NULL, TrUe, FaLsE - @steve-chavez
  • #2024, Fix schema cache loading when views with XMLTABLE and DEFAULT are present - @wolfgangwalther
  • #1724, Fix wrong CORS header Authentication -> Authorization - @wolfgangwalther
  • #2120, Fix reading database configuration properly when = is present in value - @wolfgangwalther
  • #2135, Remove trigger functions from schema cache and OpenAPI output, because they can't be called directly anyway. - @wolfgangwalther
  • #2101, Remove aggregates, procedures and window functions from the schema cache and OpenAPI output. - @wolfgangwalther
  • #2153, Fix --dump-schema running with a wrong PG version. - @wolfgangwalther
  • #2042, Keep working when EMFILE(Too many open files) is reached. - @steve-chavez
  • #2147, Ignore Content-Type headers for GET requests when calling RPCs. - @laurenceisla
    • Previously, GET without parameters, but with Content-Type: text/plain or Content-Type: application/octet-stream would fail with 404 Not Found, even if a function without arguments was available.
  • #2239, Fix misleading disambiguation error where the content of the relationship key looks like valid syntax - @laurenceisla
  • #2294, Disable parallel GC for better performance on higher core CPUs - @steve-chavez
  • #1076, Fix using CPU while idle - @steve-chavez

v9.0.0.20220531

1 year ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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 #2268 - @fjf2002

Fixed

  • #2165, Fix json/jsonb columns should not have type in OpenAPI spec
  • #2020, Execute deferred constraint triggers when using Prefer: tx=rollback - @wolfgangwalther
  • #2058, Return 204 No Content without Content-Type for PUT - @wolfgangwalther
  • #2077, Fix is not working with upper or mixed case values like NULL, TrUe, FaLsE - @steve-chavez
  • #2024, Fix schema cache loading when views with XMLTABLE and DEFAULT are present - @wolfgangwalther
  • #1724, Fix wrong CORS header Authentication -> Authorization - @wolfgangwalther
  • #2107, Clarify error for failed schema cache load. - @steve-chavez
    • From Database connection lost. Retrying the connection to Could not query the database for the schema cache. Retrying.
  • #2120, Fix reading database configuration properly when = is present in value - @wolfgangwalther
  • #1771, Fix silently ignoring filter on a non-existent embedded resource - @steve-chavez
  • #2135, Remove trigger functions from schema cache and OpenAPI output, because they can't be called directly anyway. - @wolfgangwalther
  • #2101, Remove aggregates, procedures and window functions from the schema cache and OpenAPI output. - @wolfgangwalther
  • #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
  • #2153, Fix --dump-schema running with a wrong PG version. - @wolfgangwalther
  • #2042, Keep working when EMFILE(Too many open files) is reached. - @steve-chavez
  • #2147, Ignore Content-Type headers for GET requests when calling RPCs. Previously, GET without parameters, but with Content-Type: text/plain or Content-Type: application/octet-stream would fail with 404 Not Found, even if a function without arguments was available.
  • #2155, Ignore max-rows on POST, PATCH, PUT and DELETE - @steve-chavez
  • #2239, Fix misleading disambiguation error where the content of the relationship key looks like valid syntax - @laurenceisla
  • #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(*))
  • #2294, Disable parallel GC for better performance on higher core CPUs - @steve-chavez
  • #1076, Fix using CPU while idle - @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
  • #2156, using PATCH/DELETE with limit/offset throws an error on views - @steve-chavez
  • #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
  • #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(*).

v9.0.0.20220516

2 years ago

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.
  • #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 to db-schemas=public. - @wolfgangwalther
    • #1689, Add the ability to run without db-anon-role disabling anonymous access. - @wolfgangwalther
  • #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)
  • #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 and hint error fields with a null 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 #2268 - @fjf2002

Fixed

  • #2165, Fix json/jsonb columns should not have type in OpenAPI spec
  • #2020, Execute deferred constraint triggers when using Prefer: tx=rollback - @wolfgangwalther
  • #2058, Return 204 No Content without Content-Type for PUT - @wolfgangwalther
  • #2077, Fix is not working with upper or mixed case values like NULL, TrUe, FaLsE - @steve-chavez
  • #2024, Fix schema cache loading when views with XMLTABLE and DEFAULT are present - @wolfgangwalther
  • #1724, Fix wrong CORS header Authentication -> Authorization - @wolfgangwalther
  • #2107, Clarify error for failed schema cache load. - @steve-chavez
    • From Database connection lost. Retrying the connection to Could not query the database for the schema cache. Retrying.
  • #2120, Fix reading database configuration properly when = is present in value - @wolfgangwalther
  • #1771, Fix silently ignoring filter on a non-existent embedded resource - @steve-chavez
  • #2135, Remove trigger functions from schema cache and OpenAPI output, because they can't be called directly anyway. - @wolfgangwalther
  • #2101, Remove aggregates, procedures and window functions from the schema cache and OpenAPI output. - @wolfgangwalther
  • #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
  • #2153, Fix --dump-schema running with a wrong PG version. - @wolfgangwalther
  • #2042, Keep working when EMFILE(Too many open files) is reached. - @steve-chavez
  • #2147, Ignore Content-Type headers for GET requests when calling RPCs. Previously, GET without parameters, but with Content-Type: text/plain or Content-Type: application/octet-stream would fail with 404 Not Found, even if a function without arguments was available.
  • #2155, Ignore max-rows on POST, PATCH, PUT and DELETE - @steve-chavez
  • #2239, Fix misleading disambiguation error where the content of the relationship key looks like valid syntax - @laurenceisla
  • #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(*))

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
  • #2156, using PATCH/DELETE with limit/offset throws an error on views - @steve-chavez
  • #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
  • #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(*).