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
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
Wolfgang Walther and Wolfgang Walther
68d2d834ba
nix: Update nixpkgs to 2023-03-25
2023-04-04 18:51:34 +02:00
Laurence Isla and GitHub
1aed55be68
Ignore the Range header when the method is different than GET
...
fix: bug when using Range header on PATCH/DELETE
- Fix the "message": "syntax error at or near \"RETURNING\"" error
- Fix doing a limited update/delete when an order query parameter was present
breaking: The Range header is now only considered on GET requests and is ignored for any other method
- Other methods should use the `limit/offset` query parameters for sub-ranges
- PUT requests no longer return an error when this header is present
2023-04-03 10:40:25 -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 and GitHub
3e99995e6a
feat: make db-root-spec stable ( #2694 )
2023-03-01 12:23:19 -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
steve-chavez
0d5d209bfb
perf: use LATERAL instead of CTE for json body
...
* add pgbench test for INSERT and RPC
* use LATERAL for RPC and INSERT
* add tests for inlining
2023-02-25 15:01:06 -05:00
Steve Chavez and GitHub
6a79de67ce
fix: log to stderr on AcquisitionTimeoutUsageError ( #2667 )
...
* refactor: remove uneeded type on checkIsFatal
* dry with a logPgrstError function
2023-02-17 17:38:31 -05:00
Laurence Isla and GitHub
60f4446fd8
Change inaccurate error codes to new ones
...
- Code for column is not found is PGRST204
- Code for timed out when acquiring connection to db is PGRST003
2023-02-09 14:57:51 -05:00
Laurence Isla and GitHub
c893ac15dc
Add the missing 'get' path item for RPCs to the OpenAPI output
2023-02-09 12:04:41 -05:00
steve-chavez
0139cd8261
refactor: move txMode to Plan
2023-01-30 00:23:24 -05:00
steve-chavez
7874bee879
fix: NOTIFY pgrst not reoading the catalog cache
2023-01-28 10:30:29 -05:00
AnthonyFisi and GitHub
9065ed65fa
feat: customizable OpenAPI title
2023-01-21 19:34:55 -05:00
Tuan Le and Steve Chavez
8aa79086d2
fix: consider authentication failure as a fatal error
2023-01-20 13:51:28 -05:00
Laurence Isla and GitHub
775c006806
fix: FK pointing to VIEW instead of TABLE in OpenAPI output
2023-01-20 09:37:15 -05:00
steve-chavez
be6c30a0fb
refactor: dry RPC param parsing
2023-01-18 12:26:13 -05:00
Alexander Ljungberg and GitHub
43ad6d6aa0
feat: validate ?columns mutation targets based on schema cache ( #2542 )
...
This returns an error for trying to update or insert into invalid columns, without hitting the database. This change also switches from `json_populate_recordset` for these operations `json_to_recordset` which should make no functional difference except allowing future flexibility.
2023-01-07 22:08:30 -05:00
Laurence Isla and GitHub
4ddd5b4a76
Add upsert headers for POST requests to the OpenAPI output
2022-12-27 16:16:41 -05:00
Laurence Isla and GitHub
1f69757835
fix: Add required OpenAPI items object when the paramater is an array
2022-12-20 12:30:28 -05:00
Laurence Isla and GitHub
5a660e0cbe
Add suggestions with fuzzy text search when no relationship is found ( #2583 )
2022-12-15 18:33:15 -05:00
steve-chavez
566c6fe53f
correct bad null filter restriction
...
When embedding using the column name.
Also make related order similarly strict to avoid the same kind of issues.
2022-12-15 18:02:25 -05:00
steve-chavez
3773cce246
feat: null filters on embedded resources
2022-12-12 17:14:54 -05:00
steve-chavez
81cd9d4b15
refactor: delete unused TestTypes
2022-12-12 13:31:02 -05:00
steve-chavez
781fa592ca
refactor: delete QueryCost, instead use PlanSpec
2022-12-12 13:31:02 -05:00
steve-chavez
1065021348
refactor: add planCost and planHdr for tests
2022-12-12 13:31:02 -05:00
Laurence Isla and GitHub
aecc53d8f9
fix: clarify error messages for functions
...
Move explanation on single unnamed parameters to the error details
2022-12-09 14:34:38 -05:00
steve-chavez
a5465e20d0
correct spread embed to '...'
2022-12-05 19:38:32 -05:00
Laurence Isla and GitHub
9e567216e9
feat: hint function names/parameters on error
2022-12-01 17:17:45 -05:00
Steve Chavez and GitHub
5e9dba5292
feat: Allow embedding without selecting any column ( #2574 )
2022-11-25 18:37:57 -05:00
steve-chavez
f7009635d6
test: move failed order parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
e5c77385ae
test: move failed or/and parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
3103060f4b
test: move failed json parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
315b01ebf7
test: spread embed includes junction cols
2022-11-18 18:11:14 -05:00
steve-chavez
25f65065f4
test: spread embed disambiguates recursive m2m
2022-11-18 18:11:14 -05:00
steve-chavez
60c0c11c1d
test: spread embed disambiguates 2 fks on junction
2022-11-18 18:11:14 -05:00
steve-chavez
cb99270a8f
fix: bad M2M embed on RPC
2022-11-18 17:49:24 -05:00
steve-chavez
cca0b5ae66
messages: better error for related order
2022-11-16 21:26:16 -05:00
steve-chavez
2aa0e091bb
feat: add spread embeds
2022-11-16 21:26:16 -05:00
steve-chavez
78d45b4e32
feat: add related orders
2022-11-08 17:28:50 -05:00
Laurence Isla and GitHub
b8c5d212ea
fix: Fatal error when requesting limit=0 and db-max-rows is set ( #2560 )
2022-11-04 18:14:16 -05:00
Wolfgang Walther and Wolfgang Walther
44dd73adcc
fix: Embedding views with partial FK references broken
...
This is a regression introduced in d2719420f4 .
Fixes #2548
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-31 18:15:06 +01:00
Wolfgang Walther and Wolfgang Walther
2c31c64325
fix: Detect all relationships when multiple view columns reference the same table column
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-28 18:12:58 +02:00
Wolfgang Walther and Wolfgang Walther
e274706088
fix: Ignore leading and trailing spaces in column names, fts languages and casts
...
Fixes #2285
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
ecf54bef43
test: Add basic doctests for pFieldName
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
steve-chavez
45e7aac218
fix: embedding computed with normal relationship
2022-10-27 13:49:53 -05:00