Wolfgang Walther
03f7234360
ci: test against PostgreSQL 18
2026-04-19 13:16:55 +00:00
Wolfgang Walther
1b74b93466
remove: drop support for PostgreSQL 13
...
PostgreSQL 13 has been EOL since November 2025 and will not be available
in the next Nixpkgs bump anymore.
2026-04-19 13:16:55 +00:00
Artur Bento de Carvalho and GitHub
69c6a0aa36
fix: use int32/int64 formats for integer types
...
Fixed integer type mapping in OpenAPI 2.0: replaced the invalid integer format with int32/int64 and added the toSwaggerFormat function to map PostgreSQL types to valid OpenAPI 2.0 formats:
smallint -> int32
integer -> int32
bigint -> int64
2026-04-03 14:21:32 -05:00
Taimoor Zaeem and Steve Chavez
d6c338d588
add: config db-timezone-enabled for optional querying of timezones
...
To avoid repeated querying of `pg_timezone_names` every time schema
cache is reset, `Prefer: timezone` can be disabled by setting
`db-timezone-enabled = false`.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-04-01 12:48:38 -05:00
Taimoor Zaeem and Steve Chavez
1b402d16ad
test(spec): move preference tests into separate modules
...
Towards #4751 .
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-03-26 12:36:47 -05:00
Taimoor Zaeem and Steve Chavez
5abacba0d8
fix(error): leaking table and function names when calculating hint
...
Increase similarity score to 0.75 from 0.33 for table and functions
error hint.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-03-06 16:03:21 -05:00
Laurence Isla
d10c779fc6
perf: optimize count=exact when there's no limits, offsets or db-max-rows
2026-01-28 18:43:44 -05:00
Laurence Isla
1682677297
fix: filtering the returned representation whenn using or/and filters on mutations
2026-01-27 21:24:19 +00:00
Joel Jakobsson and GitHub
fd6a3bdccf
fix: hasSingleUnnamedParam incorrectly matching named parameters
...
The hasSingleUnnamedParam function was only checking the parameter type
but not whether the parameter actually had no name. This caused functions
with a single NAMED parameter (e.g., `foo(data json)`) to incorrectly
match the single-param fallback mode.
The result was a confusing PostgreSQL error 42883 "function does not exist"
instead of a clean PGRST202 error explaining that no matching function
was found.
Added ppName == mempty check so functions with named parameters don't
incorrectly match the single-param fallback.
2025-12-15 15:34:48 -05:00
Laurence Isla
9200a98087
fix: add missing Content-Length to empty HTTP 201 responses
...
For when a preference other than return=representation is requested.
2025-12-10 14:18:19 +00:00
Laurence Isla
3b27b2220d
fix: regression that truncates error message when offset is out of bounds
...
- Happens when offset > the number of rows and when "Prefer: count=exact" header is sent
- Regression introduced in commit 57ef998
2025-12-10 14:18:19 +00:00
Taimoor Zaeem and Steve Chavez
d4caa0f5f5
fix: empty spread embeddings return unexpected SQL error
...
Fixes the SQL error from postgres when an empty spread embeddings
like `...table()` is requested.
2025-07-13 14:16:27 -05:00
Wolfgang Walther
6bf2cb09a6
remove: drop support for PostgreSQL 12
...
This has been EOL since November and has been dropped from nixpkgs.
2025-07-11 15:53:06 +00:00
Laurence Isla
a2892ab1dd
fix: regression that makes fts not work on domain types based on tsvector
2025-06-16 16:53:29 +00:00
Taimoor Zaeem and GitHub
2eb9e4a8a4
test: upserts with case sensitive table and sequence name ( #4131 )
...
Closes #3712 .
2025-06-07 12:39:50 -05:00
Taimoor Zaeem and Steve Chavez
dc46aea15e
fix: max-affected preference not failing for rpc with strict handling
2025-06-03 14:31:17 -05:00
Laurence Isla
f7fa717411
fix: regression that makes order by with nulls order not work alongside limits
2025-06-02 17:44:57 +00:00
Taimoor Zaeem and Steve Chavez
5f9e0a2739
test: add missing tests for max-affected preference with rpc
2025-05-22 12:23:52 -05:00
Laurence Isla
0b3c8c98d8
feat: improve error response when the requested schema is invalid
...
- It now shows the invalid schema in the "message"
- The exposed schemas are now listed in the "hint" instead of the "message"
2025-05-15 02:21:00 +00:00
Taimoor Zaeem and Steve Chavez
8b63ea82ec
test: add test for duplicate entries in pg_description with same OID
2025-05-14 09:31:48 -05:00
Taimoor Zaeem and Steve Chavez
f53147674e
fix: filter on unselected columns in a table-valued function
2025-04-27 14:20:13 -05:00
Laurence Isla and Steve Chavez
57ef9988a5
feat: add Content-Length response header
2025-04-24 12:49:18 -05:00
Taimoor Zaeem and Steve Chavez
fdf902319d
fix: regression with parameter charset=utf-8 in mediatype
2025-04-20 16:10:33 -05:00
Taimoor Zaeem and GitHub
feb5b7d494
fix: regression that replaces an unknown media type with */* ( #4013 )
2025-04-14 09:57:54 -05:00
Taimoor Zaeem and GitHub
f7f87b42ca
feat: add Proxy-Status header for better error response
2025-04-05 13:43:39 -05:00
Laurence Isla and GitHub
0b618d0bef
feat: allow spreading one-to-many and many-to-many embedded resources
...
* Note: Aggregates are not implemented
2025-03-24 14:45:56 +00:00
Taimoor Zaeem and GitHub
fdc26d52fc
fix: empty error messages for disabled openapi and /invalid/nested/paths
2025-03-21 11:51:40 -05:00
Taimoor Zaeem and Steve Chavez
fc35d6d0f8
fix: Fix ordering with mutation queries
2025-03-17 14:13:34 +01:00
Taimoor Zaeem and GitHub
390ba19932
fix: handle queries on non-existing table gracefully
2025-02-21 13:49:54 -05:00
Steve Chavez and GitHub
307692c325
break: remove limited updated/delete feature ( #3907 )
...
BREAKING CHANGE
As agreed on https://github.com/PostgREST/postgrest/issues/3013#issuecomment-1770186262 ,
this removes the limited update/delete feature.
The feature was complicated, largely unused and caused other bugs in
mutations.
It was added in #2195 and #2211 .
2025-02-12 14:48:08 -05:00
Laurence Isla
b7d0a1f68c
feat: apply to_tsvector() explicitly to the full-text search filtered column, only if it's not of tsvector type
2025-01-28 19:14:54 -05:00
M. Taimoor Zaeem and Steve Chavez
56c14474da
fix: insert with missing=default uses column default before using domain default
2024-12-23 15:27:40 -05:00
M. Taimoor Zaeem and Steve Chavez
a9d74eba2a
feat: allow not_null value for the is operator
2024-12-19 10:19:41 -05:00
Steve Chavez and GitHub
6db245aacd
fix: clarify PGRST116 error message ( #3795 )
...
Currently it's redundant and not easy to read.
```
{"message":"JSON object requested, multiple (or no) rows returned",
"details":"The result contains 2 rows"}
```
Now:
```
{"message":"Cannot coerce the result to a single JSON object",
"details":"The result contains an array of 0 objects"}
``
Also correct docs which had a wrong error code.
2024-11-20 12:15:46 -05:00
Laurence Isla
9c863dbddc
test: add tests for bulk upserts with surrogate keys
2024-11-15 12:05:14 -05:00
Wolfgang Walther and Wolfgang Walther
48aabeb473
nix: add postgrest-with-postgresql-17
...
PostgreSQL 17 has been released:
https://www.postgresql.org/about/news/postgresql-17-released-2936/
Let's make sure CI runs with it, too.
2024-11-12 21:13:31 +01:00
Joel Jakobsson and GitHub
180a96ce48
remove support for Prefer: params=single-object ( #3757 )
...
BREAKING CHANGE
Using this preference was deprecated in 6c3d7a9 , in favor of Functions with an array of JSON objects.
2024-11-04 20:19:08 -05:00
Laurence Isla
ded2e997e9
fix: spread embeds failing when using the "count()" aggregate without a field - @laurenceisla
...
- Fixed "column reference <col> is ambiguous" error when selecting "?select=...table(col,count())"
- Fixed "column <json_aggregate>.<alias> does not exist" error when selecting "?select=...table(aias:count())"
2024-08-21 16:56:32 -05:00
Laurence Isla
e9244f1a4f
fix: a nested spread embedding now correctly groups by the fields of its top parent relationship
2024-08-21 16:56:32 -05:00
Laurence Isla
3539aaff89
fix: prevent spread embed to use aggregates when disabled
2024-08-21 16:56:32 -05:00
Wolfgang Walther
3e7c130a0d
test: Reorganize upsert tests matching contexts
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2024-07-10 21:22:28 +02:00
Wolfgang Walther and Wolfgang Walther
86c3257f54
feat: Fail schema cache lookup with invalid db-schemas config
...
Previously, we'd silently report "200 OK" on the root endpoint, but
would never return any endpoints from the schema cache.
Now the schema cache query fails because of the ::regnamespace cast.
2024-07-09 08:31:31 +02:00
Wolfgang Walther and Wolfgang Walther
ee4bfbf253
perf: Pass arguments to RPCs called via GET directly
...
Previously they were passed as a JSON payload. This results in a LATERAL
join for the calling expression, which prevents LIMIT from being pushed
into the inlined function call, making some requests really slow.
Resolves #2858
2024-07-09 08:29:13 +02:00
Laurence Isla
c3070bbd4e
fix: nested empty embeds no longer return empty values and are correctly omitted
2024-07-04 14:21:47 -05:00
Wolfgang Walther and Wolfgang Walther
b38ea4dcd0
feat: Raise minimum supported version to 12.1
...
There is no reason to support the 12.0 version, which is outdated for
many years already. We still support all other minors for v12.
2024-06-15 17:23:34 +02:00
Wolfgang Walther and Wolfgang Walther
bb96c2dc74
feat: Drop support for pg 11
...
PostgreSQL 11 is EOL since November 2023.
2024-06-15 17:23:34 +02:00
Wolfgang Walther and Wolfgang Walther
126178642b
feat: Drop support for pg 10
2024-06-15 17:23:34 +02:00
Wolfgang Walther and Wolfgang Walther
daa77d17aa
feat: Drop support for pg 9.6
2024-06-15 17:23:34 +02:00
Taimoor Zaeem and Steve Chavez
5cc32c7f87
fix: fix incorrect 413 error on pg 54* errors
2024-05-20 18:59:33 -05:00
Wolfgang Walther
1fa35cb3b8
test: Fix coverage & style check from c4295b3d
2024-05-09 18:50:00 +02:00