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
Laurence Isla and GitHub
37a3f818dd
fix: error when requesting "Prefer: count=<type>" with null filters on embedded resources
2023-09-16 15:02:59 -05:00
Taimoor Zaeem and Steve Chavez
d64b71cbf0
refactor: rename test module NullsStrip.hs to NullsStripSpec.hs
2023-09-15 14:39:12 -03:00
Taimoor Zaeem and Steve Chavez
c195eece65
feat: add Server-Timing header with JWT duration
2023-09-15 14:39:12 -03:00
Laurence Isla and GitHub
fa182c216e
fix: bug when Null Filtering on embedded resources
...
When doing Null Filtering, the to-one embed resources were not included if they had a NULL value in any of the selected fields.
2023-09-14 21:30:48 -05:00
steve-chavez
8d3c9f8435
refactor: move media type logic to Plan module
2023-09-12 19:24:26 -03:00
steve-chavez
d8a91453d1
fix: inconsistent Preference-Applied
...
* Don't apply `tx=commit` if the transaction doesn't commit
* Apply `count=exact`
* Also simplifies the Preference-Applied logic, removing the need for
some functions.
2023-09-12 13:52:49 -03:00
Taimoor Zaeem and Steve Chavez
8eed576826
fix: range request with first position same as length return status 206
2023-09-04 15:50:00 -03:00
Taimoor Zaeem and GitHub
07fef25591
feat: allow full response control when raising exceptions
2023-09-01 14:02:03 -05:00
Taimoor Zaeem and GitHub
57fa2719dd
feat: add db-pool-automatic-recovery configuration to disable connection retrying
2023-08-23 21:08:04 -05:00
Taimoor Zaeem and Steve Chavez
87d6a0d0fe
fix: application/vnd.pgrst.array not accepted as a valid mediatype
2023-08-11 12:41:04 -05:00
steve-chavez
5ce020d5bc
fix: impersonated role applying superuser settings
2023-08-09 20:05:22 -05:00
Taimoor Zaeem and GitHub
fbf9bf21c2
feat: add optional nulls=stripped parameter for mediatypes applicatio… ( #2894 )
2023-08-09 18:49:22 -05:00
Taimoor Zaeem and Steve Chavez
d490bf09fd
feat: add Preference-Applied header in response for Prefer: return=representation/minimal/headers-only
2023-08-05 02:21:50 -05:00
Laurence Isla and GitHub
aa53623aac
fix: error when a function returns RECORD or SETOF RECORD
2023-08-03 20:09:55 -05:00
Taimoor Zaeem and GitHub
d0a71de2da
chore: improve details field of the singular error response ( #2876 )
2023-08-01 19:37:54 -05:00
Laurence Isla and GitHub
40c2bcd4a1
fix: paramaters of type character and bit not ignoring length
...
- Fixes the error "value too long for type character(1)" when the char length of the parameter was bigger than one.
2023-07-31 18:36:37 -05:00
steve-chavez
2d00d7d248
fix: null filtering on embed when column=relation
2023-07-27 22:43:13 -05:00
Laurence Isla and GitHub
630e0a1691
fix: character and bit columns with fixed length not inserting/updating properly
...
Fixes the error "value too long for type character(1)" when the char length of the column was bigger than one.
2023-07-21 11:30:01 -05:00
steve-chavez
28d5278d62
fix: use index on jsonb/jsonb arrow filter/order
2023-07-12 14:51:21 -05:00
Laurence Isla and GitHub
774d015eb5
feat: add the --version CLI option to print the version information
2023-07-07 18:19:02 -05:00
Laurence Isla and GitHub
e752224f14
feat: show PostgREST version in the logs
2023-07-07 10:28:27 -05:00
steve-chavez
add10bd10c
test: doctest for addNullEmbedFilters
2023-07-06 16:52:46 -05:00
Laurence Isla and GitHub
7508230760
feat: allow to verify the PostgREST version through SQL
2023-07-03 18:31:32 -05:00
steve-chavez
a17dd41d6b
fix: Prefer: missing=default with DOMAIN defaults
2023-06-30 17:46:16 -05:00
Alexander Ljungberg and Steve Chavez
0a1564ba5a
feat: data representations allow custom parsing and formatting of API fields.
...
See PR #2523 . Most notable code changes:
- Load data representation casts into schema cache.
- Data representations for reads, filters, inserts, updates, views, over joins.
- `CoercibleField` represents name references in queries where coercion may be needed.
- `ResolverContext` help facilitate field resolution during planning.
- Planner 'resolves' names in the API query and pairs them with any implicit conversions to be used in the query builder stage.
- Tests for all of the above.
- More consistent naming (TypedX -> CoercibleX).
New: unit tests for more data representation use cases; helpful as examples as well.
New: update CHANGELOG with data representations feature description.
Fixed failing idempotence test.
New: replace date formatter test with one that does something.
Fixup: inadvertent CHANGELOG change after rebase.
Cleanup: `tfName` -> `cfName` and related.
Document what IRType means.
Formatting.
New: use a subquery to interpret `IN` literals requiring data rep transformation.
- With the previous method, very long queries such as `ANY (ARRAY[test.color('000100'), test.color('CAFE12'), test.color('01E240'), ...` could be generated. Consider the case where the parser function name is 45 characters and there's a hundred literals. That's 4.5kB of SQL just for the function name alone!
- New version uses `unnest`: `ANY (SELECT test.color(unnest('{000100,CAFE12,01E240,...}'::text[]))` to produce a much shorter query.
- This is likely to be more performant and either way much more readable and debuggable in the logs.
2023-06-29 15:01:58 -05:00
steve-chavez
40dc46ed2e
fix: compilation on Ubuntu, GHC 9.0.2 compat
2023-06-21 16:22:30 -05:00
steve-chavez
856d450775
refactor: stricter plan media type
2023-06-20 19:12:17 -05:00
steve-chavez
aa15f4782e
refactor: remove MTPlanAttrs to doctest
2023-06-18 15:27:25 -05:00
steve-chavez
77cd9387d4
Revert "refactor: plan media type"
...
This reverts commit 3cd3a3f8c6 .
2023-06-18 15:27:25 -05:00
steve-chavez
3cd3a3f8c6
refactor: plan media type
2023-06-17 23:00:32 -05:00
steve-chavez
fad47324c3
fix: OPTIONS not accepting all available media
2023-06-13 22:00:21 -05:00
steve-chavez
8d1961ce07
refactor: cache the isolation level
2023-06-06 14:41:37 -05:00
steve-chavez
54b9a0b8b3
test: fix hello function for pg 9.6
2023-06-02 17:45:25 -05:00
steve-chavez
9a3d453bf4
test: remove big_schema.sql from io tests
...
It was unused(test skipped) and made the scache reload slower, causing
test failure on CI.
2023-06-02 17:45:25 -05:00
Steve Chavez and GitHub
a852b766eb
Fix dropping schema cache reload notifications
...
* test: bad schema reload
* refactor: DRY using the "extra" lib
* refactor: move worker funtions inside AppState
* Also rename Workers.hs to Admin.hs
2023-06-02 12:22:17 -05:00
steve-chavez
14be3fb671
feat: add pre-config function
...
Allows using the in-database configuration without SUPERUSER
2023-05-28 10:21:13 -05:00
steve-chavez
8a3686d86b
refactor: whitelist in-db config settings
2023-05-28 10:21:13 -05:00
steve-chavez
009250006e
feat: add db-pool-timeout alias
...
For db-pool-max-idletime
2023-05-22 18:34:18 -03:00
Robert and GitHub
f9f0f79fa9
feat: use hasql-pool-0.10, add db-pool-max-idletime ( #2786 )
...
- new option db-pool-max-idletime limits the maximal idle time of a
postgresql connection, defaults to 30 seconds
- this essentially restores the db-pool-timeout option from versions
<=10, with more specific name
2023-05-16 23:00:40 +02:00
steve-chavez
887948d259
fix: missing=default error msg on generated column
2023-04-27 19:27:09 -05:00
steve-chavez
67936b343f
test: prove that authenticator is not a superuser
2023-04-27 19:27:09 -05:00
steve-chavez
b0e395f495
nix: no SUPERUSER for connection role
...
Change :USER to :PGUSER in SQL scripts
2023-04-27 19:27:09 -05:00
steve-chavez
aaf77902f6
feat: isolation level for roles/functions
2023-04-15 18:05:04 -05:00
steve-chavez
3e53796120
correct missing=default with GENERATED BY column
2023-04-14 22:12:34 -05:00
Laurence Isla and GitHub
0a2b7064c7
fix: PATCH requests not recognizing embedded filters
...
- Already fixed in #2618
- Adds tests and CHANGELOG
2023-04-14 16:42:55 -05:00