Laurence Isla
c413833ec8
fix: regression that makes order by with nulls order not work alongside limits
2025-06-02 14:17:35 -05:00
Taimoor Zaeem and Wolfgang Walther
ba42e4610a
fix: log db-schemas and db-extra-search-path in schema cache load error ( #4108 )
2025-05-30 20:56:04 +02:00
Taimoor Zaeem and Wolfgang Walther
0ba47180ae
fix: allow db-extra-search-path to accept empty value
2025-05-30 14:35:57 +02:00
Taimoor Zaeem and Wolfgang Walther
0230a844b2
test: add test for duplicate entries in pg_description with same OID
2025-05-14 21:44:23 +02:00
Taimoor Zaeem and Wolfgang Walther
e0e60fa433
fix: jwt error return status 400 for invalid role ( #4081 )
2025-05-14 21:44:22 +02:00
Taimoor Zaeem and Wolfgang Walther
7269630538
test: add test when using .aud in jwt-role-claim-key
2025-05-14 21:44:20 +02:00
Laurence Isla
e0c5b3a314
correct: handle array values in JWT aud claim correctly
2025-05-07 21:54:32 +00:00
Laurence Isla
b3bff90d68
correct: fail on invalid types of registered JWT claims (exp, nbf, iat, aud)
2025-05-07 21:54:32 +00:00
steve-chavez
98ca7c15d5
drop: Admin server config endpoint
...
BREAKING CHANGE
The endpoint was at risk of being left unprotected when exposing it.
The accompanying `admin-server-config-enabled` config was also dropped.
2025-05-04 13:53:50 -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
steve-chavez
58237be608
test: add loadtest for async purge of JWT cache
2025-04-20 15:11:41 -05:00
steve-chavez
58b5dff188
Revert "nix: add loadtest with unique JWTs"
2025-04-18 17:43:10 -05:00
steve-chavez
9c3816218a
ci: adjust upper bound of PATCH memory test
2025-04-17 23:11:33 -05:00
steve-chavez
608f7ca45a
nix: add loadtest with unique JWTs
...
This loadtests the jwt decoding logic. For this it adds an optional
`-k`(kind) parameter to `postgrest-loadtest` and
`postgrest-loadtest-against`.
Old kind (default):
```
postgrest-loadtest -k mixed
postgrest-loadtest-against -k mixed
```
New kind:
```
postgrest-loadtest -k jwt
postgrest-loadtest-against -k jwt
```
Internally it uses a dynamically generated targets file using python
which looks like:
```
GET http://postgrest/authors_only
Authorization: Bearer <jwt>
GET http://postgrest/authors_only
Authorization: Bearer <another-jwt>
...
```
Then this is used to run vegeta with the `-lazy` option.
2025-04-17 23:11:33 -05:00
Taimoor Zaeem and GitHub
bc5ec43300
fix: invalid JWTs after jwt-secret is changed in a config reload ( #4015 )
2025-04-16 09:40:36 -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
Wolfgang Walther
95e36fdad9
nix: avoid rebuilding memory tests when entering nix-shell
...
The memory tests are now run in the same way as the regular tests.
2025-03-30 18:57:39 +00: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 Steve Chavez
dd29e74150
test: fix config value in io test
2025-03-13 10:19:29 +01:00
Taimoor Zaeem and Steve Chavez
e3041fc4a0
test: correct jwt parse time test
2025-03-13 10:19:29 +01:00
Taimoor Zaeem and Steve Chavez
36b6a2c86b
fix: improve jwt errors
2025-03-13 00:20:54 +01:00
Taimoor Zaeem and Steve Chavez
53ca035e9b
test: rename module NoJwtSpec.hs -> NoJwtSecretSpec.hs
2025-03-06 10:30:02 -05:00
Taimoor Zaeem and GitHub
c9a625ced6
feat: Log PoolRequest and PoolRequestFullfilled observations ( #3925 )
2025-02-28 12:01:10 -05:00
Taimoor Zaeem and GitHub
390ba19932
fix: handle queries on non-existing table gracefully
2025-02-21 13:49:54 -05:00
Laurence Isla and GitHub
9c880c082a
feat: allow logging the SQL query to stderr
...
- Logs the main SQL query when `log-query=main-query`.
- Only logs at the current `log-level`.
2025-02-18 19:17:26 -05:00
Taimoor Zaeem and Steve Chavez
66e966d864
refactor: move jwt caching logic to Auth/JwtCache.hs
2025-02-17 14:19:40 -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
M. Taimoor Zaeem and Steve Chavez
c96dc3ee90
fix: log 503 client error to stderr
2025-02-08 21:08:29 -05:00
Taimoor Zaeem and GitHub
71a147392a
fix: jwt cache is not purged ( #3801 )
2025-01-29 14:53:10 -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
Wolfgang Walther
07d6d75abe
chore: remove deprecation warning in IO tests
2024-12-22 18:49:20 +01: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
M. Taimoor Zaeem and Steve Chavez
af6b79d4d7
feat: support string comparison for jwt-role-claim-key
2024-12-12 08:47:06 -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
steve-chavez
87dddd66d2
fix: clarify "listening" logs
...
It's not immediately clear on which port the API server is listening.
Also it's not clear that the "pgrst" channel is for database
notifications.
Goes from:
<timestamp>: Admin server listening on 0.0.0.0:3001
<timestamp>: Listening on 0.0.0.0:3000
<timestamp>: Listening for notifications on the "pgrst" channel
To:
<timestamp>: Admin server listening on 0.0.0.0:3001
<timestamp>: API server listening on 0.0.0.0:3000
<timestamp>: Listening for database notifications on the "pgrst" channel
2024-10-02 22:47:22 -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
Andrei Dziahel and GitHub
46537879ae
feat: Add resolved host to "Listening on ..." messages ( #3560 )
...
This adds resolved host's IP to "Listening on ..." messages emitted when
app and admin servers start.
2024-08-01 11:31:35 -05:00
7c74f6cf0a
fix: schema cache loading before the in-db config ( #3670 )
...
Fixes #3660 . Load the config after getting the pg version but before loading the schema.
The regression happened on f09655b .
Also remove schema cache load wrapper and separate db queries in different functions.
Co-authored-by: Laurence Isla <lau.isla.c@gmail.com >
2024-08-01 10:37:48 -05:00
Wolfgang Walther and Wolfgang Walther
50bdb6a3de
fix: Embed One-to-One relationship with different column order properly
2024-07-13 22:26:36 +02:00