steve-chavez
902e4e8921
refactor: clean allColumns query
...
* Add OpenAPI test to ensure enum labels are present
* Remove unnecessary fk/pk columns cte
* Remove unnecessary step for parsing enum labels
2022-04-22 11:46:45 -05:00
steve-chavez
d2719420f4
refactor: PKcols in table, ViewKeyDependency type
...
* Get PKcols inside tables - done with SQL for tables and
with an additional step in Haskell for views.
This fixes an fk column being considered as a pk column on views
and corrects the test added on
https://github.com/PostgREST/postgrest/pull/1875/files/1d549768580310e18aac4ffa6dbd01c5b77934a7#r853674126
* classify view key dependencies in SQL
* remove Column from Relationship
* Merge cols/fcols in Relationship and
ensure allM2ORels and allViewsKeyDependencies fk columns
are ordered - done by attnum in SQL
* Cardinality now contains relColumns instead of Relationship -
this simplifies getJoinConditions.
2022-04-21 14:44:45 -05:00
steve-chavez
057e8d63bf
test: add big schema openapi test
...
The io test is marked as pending for now, because the stack size it
requires is too big.
2022-04-20 20:05:11 -05:00
steve-chavez
f4e171aa2b
refactor: ignore partitions in allM2ORels
...
Also clarify foreign key filter
2022-04-19 17:23:12 -05:00
steve-chavez
7f1507b9fb
refactor: remove Table from Relationship
...
Just having the QualifiedIdentifier gets us closer to having
Relationship as a Table attribute since it avoids a cyclic dependency
* remove unnecessary findTable
* modify RootSpec test
2022-04-18 15:48:03 -05:00
steve-chavez
cdcc175abf
refactor: table list to table map
2022-04-18 15:48:03 -05:00
steve-chavez
f995799e8f
refactor: remove fkey from allPrimaryKeys query
...
The query had the unnecessary 'f' in `c.contype in ('p', 'u', 'f')`
Also comment and clarify the query by using explicit JOINs
2022-04-18 15:48:03 -05:00
steve-chavez
44e2b2fbb4
refactor: DRY allTables/accessibleTables query
2022-04-18 15:48:03 -05:00
steve-chavez
2eaf81334e
nix: local history for nix-shell
2022-04-18 15:48:03 -05:00
steve-chavez
c399b1f5f8
nix: log all statements in temp db
2022-04-18 15:48:03 -05:00
Laurence Isla and GitHub
bc7d54c7d2
Add CI for ARM architectures ( #2127 )
2022-04-18 17:40:32 +02:00
Laurence Isla and GitHub
7589102c6c
Fix misleading disambiguation error where relationship looks like valid syntax
...
* Add columns for the m2m relationship
2022-04-12 00:02:19 +02:00
Michael Kane Juncker and Wolfgang Walther
007f49a8bc
feat(query): add basic regular expression operator support - refs #2236
2022-04-11 08:33:16 +02:00
dependabot[bot] and Wolfgang Walther
a768bcbf20
build(deps): bump codecov/codecov-action from 2.1.0 to 3.0.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-04-11 08:23:26 +02:00
dependabot[bot] and Wolfgang Walther
cb145271ac
build(deps): bump actions/cache from 2.1.7 to 3
...
Bumps [actions/cache](https://github.com/actions/cache ) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases )
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-03-28 07:45:07 +02:00
Laurence Isla and GitHub
9124dfd427
Bypass FreeBSD builds due to timeouts
2022-03-26 15:14:54 -05:00
Laurence Isla
8e86177486
bump version to 9.0.0.20220326
2022-03-26 12:26:47 -05:00
Laurence Isla and GitHub
fe898c27ae
Fix incorrectly placed feature in CHANGELOG
...
Move incorrectly placed feature for PostgREST errors from v9.0.0 to Upcoming
2022-03-26 11:08:37 -05:00
steve-chavez
f3f9030c48
disallow limit/offset on views
2022-03-26 15:29:13 +01:00
steve-chavez
73dc2692b1
refactor: add findTable function
2022-03-26 15:29:13 +01:00
steve-chavez
87ffe39746
fix: ignore max-rows on POST/PATCH/PUT/DELETE
2022-03-26 15:29:13 +01:00
steve-chavez
331e88ea39
feat: add limited delete
2022-03-26 15:29:13 +01:00
steve-chavez
f4becf99ad
feat: add limited update
2022-03-26 15:29:13 +01:00
Ezequiel Alvarez and GitHub
799daa7556
fix: json/jsonb columns should not have type "string" in OpenAPI spec ( #2203 )
...
* Switch to no type for json/jsonb
2022-03-26 15:16:35 +01:00
Steve Chavez and GitHub
a3c1d9977f
Correct live/ready checks to consider special host values ( #2182 )
2022-03-11 15:16:45 +01:00
dependabot[bot] and GitHub
c803c4d0b6
build(deps): bump actions/checkout from 2.4.0 to 3 ( #2186 )
2022-03-08 01:56:58 +01:00
dependabot[bot] and GitHub
8aef09574c
build(deps): bump actions/upload-artifact from 2.3.1 to 3 ( #2187 )
2022-03-08 01:46:30 +01:00
dependabot[bot] and GitHub
efcc93ad89
build(deps): bump actions/download-artifact from 2.1.0 to 3 ( #2185 )
2022-03-07 22:54:47 +01:00
Laurence Isla and GitHub
d6834e8bf8
Add 'PGRST' error code to differentiate from PostgreSQL errors
2022-03-04 15:57:38 -05:00
Laurence Isla and GitHub
99d0b805df
fix: Using GET with certain Content-Type headers now correctly calls the no parameter function if it exists
...
Using GET with text/plain or application/octet-stream as Content-Type headers no longer returns 404 Not Found when a function with no parameters exists
2022-02-28 13:23:55 -05:00
Laurence Isla and GitHub
69070f341a
fix: Remove admin-server-port from in-db configuration
2022-02-23 17:26:01 -05:00
steve-chavez
dcf7ade5bc
bump version to 9.0.0.20220211
2022-02-11 14:47:33 -05:00
Steve Chavez and GitHub
9021c96baa
fix: Keep working when EMFILE is reached ( #2158 )
...
Done by upgrading to warp 3.3.19
2022-02-09 17:27:29 -05:00
Wolfgang Walther and Wolfgang Walther
41a4396147
fix: Remove uncallable functions from schema cache and OpenAPI output
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-08 09:08:27 +01:00
Wolfgang Walther and Wolfgang Walther
d9f7f6f509
refactor: Remove pg_catalog prefix from schema cache queries
...
Since the search path is voided at the beginning, there is no need to qualify those.
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-08 09:08:27 +01:00
Wolfgang Walther and Wolfgang Walther
bd62008e1c
fix: Remove aggregates, procedures and window functions from schema cache and OpenAPI output
...
Aggregates and Window functions can't be called as RPCs in a useful way.
Procedures are not supported right now, but might be added later.
Resolves #2101
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-05 17:48:22 +01:00
Wolfgang Walther and Wolfgang Walther
ded8981368
fix: Take PG version into account in --dump-schema
...
The PG version is only read by the Connection Worker, which is not used in the case dump-schema. Now, the pg version is read in the schema cache queries directly, avoiding this problem in all cases.
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-05 17:48:22 +01:00
Wolfgang Walther and Wolfgang Walther
52d628f1ed
fix: Return 204 No Content without Content-Type for RPCs returning VOID
...
Resolves #2001
BREAKING CHANGE: Previously, those RPCs would return "null" as a body with Content-Type: application/json.
2022-02-05 09:28:28 +01:00
Wolfgang Walther
9ca9a54d21
bump version to 9.0.0.20220204
2022-02-04 08:34:51 +01:00
Wolfgang Walther
bf689565a5
fix broken link in docker hub description, resolves #2148
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-04 08:34:35 +01:00
Wolfgang Walther and Wolfgang Walther
9f1b5c0a81
feat: Support accessing array items and fields of composite types through json operators
...
This is supported in select=, in filters and in order=.
Resolves #1543
Resolves #2075
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-03 08:13:38 +01:00
Wolfgang Walther and Wolfgang Walther
87bd8e72cf
fix changelog
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-02-03 08:13:38 +01:00
Wolfgang Walther and Wolfgang Walther
8934190d43
nix: Add postgrest-release tool
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-30 19:52:35 +01:00
Wolfgang Walther
c894b543b0
bump version to 9.0.0.20220130
2022-01-30 16:15:27 +01:00
Wolfgang Walther and Wolfgang Walther
58f76f3d6d
fix: Return 405 Method Not Allowed for unsupported verbs
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00
Wolfgang Walther and Wolfgang Walther
8980b09419
refactor: Sort error types
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00
Wolfgang Walther and Wolfgang Walther
927ff6f1e5
test: Split spec tests into multiple subfolders
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00
Wolfgang Walther and Wolfgang Walther
8a722e2cfe
refactor: Replace elem with pattern matching to highlight missing code coverage
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00
Wolfgang Walther and Wolfgang Walther
271c329677
nix: Fix postgrest-git-hooks causing merge conflicts when staging files partially
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00
Wolfgang Walther and Wolfgang Walther
c63420f0e7
nix: Fix postgrest-git-hooks disable not working
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 19:26:33 +01:00