steve-chavez
00580bc8cb
bump version to 12.0.0
2023-12-01 19:18:07 -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
558e9d40e8
changelog: join server-timing entries
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
steve-chavez
3d56f8435d
chore: delete dead error codes
2023-11-28 10:25:25 -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
steve-chavez
ed90774f53
test: query the empty string
2023-11-03 12:58:54 -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
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
steve-chavez
a9d6c318fd
nix: instructions for static binary
2023-10-06 19:54:05 -03:00
steve-chavez
2aa58164ab
refactor: move errors to ApiRequestError
2023-10-06 01:16:45 -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
steve-chavez
3dd292be46
refactor: DRY application/json on Error.hs
...
Small refactor to help with:
https://github.com/PostgREST/postgrest/issues/2901
2023-10-06 01:16:45 -03:00
steve-chavez
0703f27d2b
changelog: update to 11.2.1
2023-10-04 12:12:30 -03:00
steve-chavez
3b1eb51744
ci: fix MacOS CI
2023-09-29 19:50:15 -03:00
steve-chavez
cf7ee67dfe
fix: arrow filter on RPC returning TABLE+composite
2023-09-28 20:26:38 -03:00
steve-chavez
290d90609b
fix: unnecessary set default_transaction_isolation
2023-09-27 17:48:48 -03:00
steve-chavez
2825ac059e
refactor: make Response module pure
2023-09-27 11:50:22 -03: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
steve-chavez
531a183b44
nix: postgrest-coverage notice
2023-08-17 13:43:48 -05:00
steve-chavez
739f056b0a
nix: add postgrest-repl command
2023-08-17 13:43:48 -05:00
Steve Chavez
32b77cae6c
Revert "nix: Update nixpkgs to 2023-08-04"
...
This reverts commit 2434724edd .
2023-08-15 23:55:35 -05:00
steve-chavez
c820efb64a
bump version to 11.2.0
2023-08-10 08:51:58 -05:00
steve-chavez
e30bf53afa
deprecate: target embedding disambiguation
2023-08-10 08:14:23 -05:00
steve-chavez
5ce020d5bc
fix: impersonated role applying superuser settings
2023-08-09 20:05:22 -05:00
steve-chavez
0fce7ca361
refactor: Response rm Paths_postgrest dependency
...
This allows using doctests on the Response.hs module
2023-08-02 16:28:48 -05:00
steve-chavez
2d00d7d248
fix: null filtering on embed when column=relation
2023-07-27 22:43:13 -05:00
steve-chavez
28d5278d62
fix: use index on jsonb/jsonb arrow filter/order
2023-07-12 14:51:21 -05:00
steve-chavez
e332f038ef
fix: HEAD unnecessarily executing aggregates
2023-07-10 15:05:51 -05:00
steve-chavez
905fcb05cc
refactor: add ResultAggregate type
2023-07-10 15:05:51 -05:00
steve-chavez
add10bd10c
test: doctest for addNullEmbedFilters
2023-07-06 16:52:46 -05:00
steve-chavez
52d3026133
refactor: remove unneeded FilterNullEmbed
2023-07-06 16:52:46 -05:00
steve-chavez
20b06efabe
chore: show on ReadPlan and MediaType
2023-07-05 17:35:54 -05:00
steve-chavez
a17dd41d6b
fix: Prefer: missing=default with DOMAIN defaults
2023-06-30 17:46:16 -05:00
steve-chavez
078c6ec08c
refactor: remove SqlFragment and use SQL.Snippet
2023-06-22 21:46:16 -05:00
steve-chavez
40dc46ed2e
fix: compilation on Ubuntu, GHC 9.0.2 compat
2023-06-21 16:22:30 -05:00
steve-chavez
d9261fa674
ci: check against GHC 9.0.2
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
78821a8fe7
refactor: clarify content negotiation
2023-06-16 17:36:44 -05:00
steve-chavez
5c372df487
refactor: asJsonF/asJsonSingleF Routine param
2023-06-16 17:36:44 -05:00
steve-chavez
fad47324c3
fix: OPTIONS not accepting all available media
2023-06-13 22:00:21 -05:00
steve-chavez
1f13e43abe
bump version to 11.1.0
2023-06-07 19:03:31 -05:00
steve-chavez
fac797c766
changelog: clarify 2781
2023-06-07 18:28:01 -05:00
steve-chavez
07cb0b582e
feat: recover on pg_terminate_backend
2023-06-06 14:41:37 -05:00
steve-chavez
d54a2f48de
refactor: move checkIsFatal to AppState
2023-06-06 14:41:37 -05:00
steve-chavez
bcce7b1c53
fix: stop retrying on "no password supplied"
2023-06-06 14:41:37 -05:00
steve-chavez
8d1961ce07
refactor: cache the isolation level
2023-06-06 14:41:37 -05:00
steve-chavez
9a19dff83e
refactor: move debounceLogAcquisitionTimeout
...
Move it to AppState
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
4f6c466031
nix: postgrest-run uses similar config to tests
...
Otherwise manual tests can be deceiving
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
steve-chavez
38ad8c04e1
nix: withTmpDb set search_path to test
...
It gets repetitive to set the search_path every time you go in the test
db with psql.
2023-05-22 13:46:24 -03:00
steve-chavez
a867d79c42
nix: withTmpDb psql notice can't mutate the db
...
Use the postgres role instead of the authenticator on the notice
2023-05-05 20:03:09 -03:00
steve-chavez
4197d2f739
bump version to 11.0.1
2023-04-27 21:30:40 -05:00
steve-chavez
c10ba8e214
fix: skew of 30 seconds for JWT validation
2023-04-27 21:06:06 -05:00
steve-chavez
887948d259
fix: missing=default error msg on generated column
2023-04-27 19:27:09 -05:00
steve-chavez
c63786733a
fix: no schema privilege for schema cache
...
This was due to the usage of pg_get_serial_sequence
2023-04-27 19:27:09 -05:00
steve-chavez
4fe696dd96
nix: PGRST_DB_ANON_ROLE default for postgrest-run
...
Makes manually testing a feature easier
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
dd2f5511d8
bump version to 11.0.0
2023-04-16 14:22:38 -05:00
steve-chavez
49c349c846
chore: CHANGELOG to include release 10.2.0
2023-04-16 12:18:10 -05:00
steve-chavez
aaf77902f6
feat: isolation level for roles/functions
2023-04-15 18:05:04 -05:00
steve-chavez
4c555cbd5d
refactor: authRole to ByteString
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
steve-chavez
ce378e6b3a
refactor: clarify Scalar type
...
It now contains the type of the scalar. This way we can discriminate the
void type in a more obvious way.
2023-04-13 18:17:43 -05:00
steve-chavez
feadf59bb3
refactor: rename Proc module to Routine
...
Assuming that functions=procedures is wrong since pg11, which introduced
real stored procedures.
2023-04-13 18:17:43 -05:00
steve-chavez
e572d1d1a2
feat: configurable role settings
2023-04-10 14:27:08 -05:00
steve-chavez
c06237cc56
fix: db settings and pg version query not prepared
2023-04-10 14:27:08 -05:00
steve-chavez
c656a870f4
bump version to 10.2.0.20230407
2023-04-07 14:02:14 -05:00
steve-chavez
1b625cb77a
feat: any/all modifiers for operators
...
Only for the eq,like,ilike,gt,gte,lt,lte,match,imatch operators
2023-04-07 13:10:57 -05:00
Steve Chavez and GitHub
acf62320ef
RPC returning table alias now works for pg 11/12 ( #2737 )
...
The new LATERAL query used for calling the function, introduced on
https://github.com/PostgREST/postgrest/pull/2677 , failed on functions
that returned a domain like `CREATE DOMAIN projects_domain AS projects`.
Work around that by changing the query conditionally, by
obtaining a bool that represents the composite alias on the SchemaCache
and only do this on pg 11 and 12.
2023-04-05 15:34:41 -05:00
steve-chavez
16f2849724
refactor: wrap proc logic in asJsonF
...
* add explicit logic for returning setof scalars
2023-04-04 19:55:10 -05:00
steve-chavez
d945e8c06a
refactor: remove Maybe from RetType for Proc type
2023-04-04 19:55:10 -05:00
steve-chavez
bc1fb67df0
drop: Prefer: params=multiple-objects on RPC
...
BREAKING CHANGE
A function with a JSON array or object parameter should be used instead
2023-04-04 19:55:10 -05:00
Steve Chavez and GitHub
eb777cf823
Update BACKERS.md
2023-04-03 11:09:19 -05:00
steve-chavez
032f07f3f0
refactor: remove character varying casting
2023-03-29 13:17:15 -05:00
steve-chavez
7629eff51d
undefined-keys=apply-defaults to missing=default
2023-03-29 05:33:38 -05:00
steve-chavez
46fd856fc6
test: tidy inlining plan test
2023-03-29 05:33:38 -05:00
Steve Chavez and GitHub
439a96c578
feat: undefined json keys as defaults w/ Prefer:undefined-keys
2023-03-22 02:44:14 -05:00
steve-chavez
cae1c67b00
refactor: add iPreferences to ApiRequest
...
It avoids adding a new iPrefer.. to the ApiRequest every time a
preference is added.
2023-03-09 14:40:32 -05:00
Steve Chavez and GitHub
b05ea14122
nix: add notices for postgrest-with-* commands ( #2697 )
...
For knowing where to connect and how to get logs
2023-03-07 12:42:41 -05:00
Steve Chavez and GitHub
666114f81d
refactor: remove SchemaCache from ApiRequest ( #2695 )
2023-03-06 13:22:35 -05:00
Steve Chavez and GitHub
3e99995e6a
feat: make db-root-spec stable ( #2694 )
2023-03-01 12:23:19 -05:00
steve-chavez
8213c58452
ci: pin Nix version to avoid error
...
To 2.13.3
2023-02-28 17:30:54 -05:00
steve-chavez
ee036f8397
feat: add server-trace-header config for tracing
2023-02-28 17:30:54 -05:00
steve-chavez
5b6421d03a
test: fix sporadic failure on PlanSpec
2023-02-28 17:30:54 -05:00