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
Andrei Dziahel and GitHub
3432f75ed4
fix: fixes server timings' precision ( #3227 )
...
* test: fix test_io accordingly
2024-02-14 12:26:34 -05:00
steve-chavez
5424be76d9
feat: log schema cache stats to stderr
...
adjust the memory tests
2024-02-09 16:18:04 -05:00
Taimoor Zaeem and Steve Chavez
f9ee1f7e73
feat: apply all function settings as transaction-scoped settings
2024-02-09 11:37:01 -05:00
Ivan Kasatenko and GitHub
71887e4b78
feat: dump config through Admin API
2024-02-05 19:16:05 -05:00
Wolfgang Walther
310d04065e
test: Make failing loadtest fixtures pass again
...
PR #2358 added a bulk insert to the loadtest. However this broke the regular insert test,
which just returned 400 Bad Request because of a missing PK value since. Adding the new
id column in the payload to the ?columns= argument fixes that.
2024-02-05 21:40:21 +01:00
steve-chavez
45cabacdcc
fix: wrong subquery error returning as 400 status
2024-02-02 22:08:56 -05:00
Wolfgang Walther and Wolfgang Walther
6682baebd2
nix: Update nixpkgs and build with GHC 9.4.8
2024-01-18 18:54:33 +01: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
Laurence Isla and GitHub
4fb521cac6
fix: add jwt_cache_max_lifetime as an in-database configuration option ( #3102 )
2023-12-12 16:29:50 -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
Laurence Isla and GitHub
ca5eb64deb
chore: fix server-timing metric order and doctest
2023-11-28 12:45:39 -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
dfa875c8c7
fix: do not log internal db errors like 'acquisition timeout' when log-level=crit
2023-11-27 23:06:40 -05:00
Laurence Isla and Steve Chavez
33891e3a73
feat: log all internal database errors to stderr
2023-11-27 23:06:40 -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
Andrei Dziahel and GitHub
df97a5071f
Display an actual TCP port app is bound to ( #3034 )
2023-11-23 18:17:16 -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
Andrei Dziahel and GitHub
c3301a1653
feat: implement server-timing-enabled config parameter ( #3064 )
2023-11-22 17:57:50 -05:00
steve-chavez
f7bf2157f3
feat: apply super settings on impersonated roles
...
If they have GRANT SET ON PARAMETER <setting> TO authenticator
2023-11-21 10:54:56 -05:00
Taimoor Zaeem and GitHub
125f10a60f
feat: add statement_timeout set on functions ( #3056 )
2023-11-17 12:36:51 -05:00
Taimoor Zaeem and GitHub
3c1a7f2641
feat: add timezone in Prefer header ( #3024 )
...
* increase reloading timeout in io-tests
* increase memory test by 1M
2023-11-13 14:16:27 -05:00
steve-chavez
ed90774f53
test: query the empty string
2023-11-03 12:58:54 -05:00
Laurence Isla
226400a5bc
break:remove the db-use-legacy-gucs config
...
BREAKING CHANGE
All PostgreSQL versions will use JSON GUCs for headers, cookies and JWT claims.
2023-11-02 15:50:22 -05:00
Laurence Isla and GitHub
b235227119
allow all origins when server-cors-allowed-origins is an empty string
2023-10-27 21:30:56 -05:00
Taimoor Zaeem and GitHub
5c9c7f4ff4
fix: HTTP status responses for upserts
...
* PUT returns 201 instead of 200 when rows are inserted
* POST with "Prefer: resolution=merge-duplicates" returns 200 instead of 201 when no rows are inserted
2023-10-26 20:49:20 -05:00
steve-chavez
82b38341bf
feat: sql handlers for custom media types
...
* test text/html and drop HtmlRawOutputSpec.hs
* all tests passing, removed all pendingWith
* make functions compatible with pg <= 12
* move custom media types tests to own spec
* anyelement aggregate
* apply aggregates without a final function
* overriding works
* overriding anyelement with particular agg
* cannot override vendored media types
* plan spec works with custom aggregate
* renamed media types to make clear which ones are overridable
* correct content negotiation with same weight
* text/tab-separated-values media type
* text/csv with BOM plus content-disposition header
2023-10-26 09:04:02 -05:00
steve-chavez
4a90e9fbd9
break: db-root-spec default app/openapi+json media
...
BREAKING CHANGE
Can be done later with custom media types
2023-10-26 09:04:02 -05:00
steve-chavez
14d030b96c
break: remove binary field logic, raw-media-types
...
BREAKING CHANGE
Can be done later with custom media types
2023-10-26 09:04:02 -05:00
Taimoor Zaeem and GitHub
d94286c185
feat: add config to specify CORS origins ( #2986 )
2023-10-24 09:38:25 -05:00
Taimoor Zaeem and GitHub
618f93dec1
test: fix typos in batch upsert tests
2023-10-21 16:29:43 -05:00
Laurence Isla and GitHub
317619bf62
fix: regression by reverting fix that returned 206 when first-pos=length in Range header
2023-10-21 16:28:08 -05:00
steve-chavez
eb238ad678
test: DRY scache/config sleep in io tests
...
Also increase schema cache sleep to 0.2 as 0.1 tends to fail in CI.
2023-10-20 17:53:54 -05:00
steve-chavez
54786a6c04
fix: unnecessary count() on RPC returning single
2023-10-19 15:54:22 -05:00
steve-chavez
00f3cb3746
test: prove RPC returning single always gives 1
2023-10-19 15:54:22 -05:00
Taimoor Zaeem and GitHub
f10b4c3268
test: add tests for batch upserts ( #3005 )
2023-10-13 09:47:26 -03:00
Andrei Dziahel and GitHub
dc01c748ae
feat: add more perf counters to Server-Timing ( #2983 )
2023-10-12 09:55:30 -03:00
Kam Ting Hoi and GitHub
818387f24e
fix: range request with 0 rows and 0 offset return status 416 ( #2991 )
2023-10-07 00:10:17 -03:00
steve-chavez
df08d7f3ff
refactor: rename JSONParseError to PGRSTParseError
...
The error name is too generic otherwise.
2023-10-06 01:16:45 -03:00
Laurence Isla and GitHub
910950dbac
fix: RPCs not embedding correctly when using overloaded functions for computed relationships
2023-10-02 16:00:33 -05:00
steve-chavez
cf7ee67dfe
fix: arrow filter on RPC returning TABLE+composite
2023-09-28 20:26:38 -03:00
Taimoor Zaeem and Steve Chavez
3c1cdd434a
feat: add handling=strict/lenient for Prefer header
2023-09-27 15:00:52 -03:00
Taimoor Zaeem and GitHub
a6e3eda5b2
feat: implement JWT caching ( #2928 )
2023-09-25 14:46:55 -03:00