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
Wolfgang Walther
01a56db7d8
test: Make unicode insert test work in parallel mode
...
Changing the PK here will avoid duplicate conflicts with another test.
References #1799
2024-05-09 18:05:44 +02:00
Wolfgang Walther
577a7c7598
test: Move limited delete/update tests into separate spec file
...
This potentially allows to run the remaining tests in those files in
parallel mode.
References #1799
2024-05-09 18:05:44 +02:00
Wolfgang Walther
c4295b3d63
test: Make PgSafeUpdateSpec parallel-ready
2024-05-09 18:05:44 +02:00
Taimoor Zaeem and Steve Chavez
21bc48ad9a
fix: fix wrong 503 Service Unavailable on pg error 53400
2024-05-06 07:54:11 -05:00
Laurence Isla and GitHub
69bbce5b32
feat: improve PGRST121 error message
...
* Clarify the message field
* Show failed MESSAGE or DETAIL in the the PGRST121 error's details field
* Show the correct JSON format in the hint field
2024-04-24 13:33:10 -05:00
Taimoor Zaeem and Steve Chavez
88abf600c4
fix: fix wrong http status on pg error 42P17 infinite recursion
2024-04-22 13:40:07 -05:00
Taimoor Zaeem and Steve Chavez
973201a8d3
fix: remove rejected mediatype application/vnd.pgrst.object+json from response
2024-04-13 16:07:38 -05:00
steve-chavez
2543b8d724
fix: clarify PGRST204 error message
2024-04-01 19:03:14 -05:00
Steve Chavez and GitHub
650249ed29
perf: remove json_typeof ( #3316 )
2024-03-08 16:02:28 -05:00
steve-chavez
05cdbb34c2
test: insignificant JSON whitespace on writes
2024-03-07 17:14:16 -05:00
Wolfgang Walther
00fbe9ff3e
fix: Avoid casting to table type when select= and media type handler are used
...
Previously using a generic mimetype handler failed when any kind of select= was given, because
we tried to cast the select-result to the original table type. With this change, this cast is
only applied when select=* is given implicitly or explicitly. This is the only case where this
makes sense, because this guarantees that correct columns are selected in the correct order for
this cast to succeed.
Resolves #3160
2024-02-15 19:01:12 +01:00
Wolfgang Walther
2466f4e738
fix: Return 406 instead of 415 for non-acceptable media type
...
415 is for Content-Type and 406 for Accept headers.
2024-02-15 19:01:12 +01:00
steve-chavez
45cabacdcc
fix: wrong subquery error returning as 400 status
2024-02-02 22:08:56 -05:00
steve-chavez
3af63cb94c
fix: empty row on handler function
...
Closes https://github.com/PostgREST/postgrest/issues/3126
2023-12-20 16:18:09 -05:00
steve-chavez
1680a6eed3
fix: aggregates not working for all schemas
...
Closes https://github.com/PostgREST/postgrest/issues/3124
2023-12-20 15:20:18 -05:00
Taimoor Zaeem and GitHub
0b77098460
feat: add max-affected preference to prefer header ( #3083 )
2023-12-18 18:35:23 -05:00
steve-chavez
6b9fde59cd
fix: any handler sets a default application/json
...
Now it sets application/octet-stream as the generic type.
2023-12-12 17:44:07 -05:00
Andrei Dziahel and GitHub
cbfff2804d
fix: replace json parser error with generic msg ( #3090 )
2023-12-07 18:04:51 -05:00
Laurence Isla and GitHub
d49e3d7132
fix: allow using special characters in json keys ( #3081 )
...
* increase memory size test
2023-12-06 17:28:51 -05:00
steve-chavez
9fe11249f9
feat: custom SQL handler for the "*/*" media type
2023-11-28 23:14:38 -05:00
steve-chavez
b080f59bac
test: server timing on root and options method
2023-11-28 10:25:25 -05:00
steve-chavez
958339b8d3
chore: change server timing render to response
...
"render" is a loaded term than might be thought as the generation
of a full HTML page. While for this phase we only process the status
and the headers.
Changing it to "response" so is not misleading at least. Users can check the
docs for clarification.
2023-11-28 10:25:25 -05:00
Laurence Isla and Steve Chavez
b538ab9823
feat: add timing for the api request parse
2023-11-24 16:29:25 -05:00
Laurence Isla and Steve Chavez
850b15fe13
fix: change timing name from 'query' to 'transaction'
2023-11-24 16:29:25 -05:00
Tim Abdulla and GitHub
1c60b50e2e
Add aggregate functions ( #2925 )
...
The aggregate functions SUM(), MAX(), MIN(), AVG(), and COUNT() are now supported.
2023-11-23 14:03:03 -05:00